Writing books on technology topics rarely makes much money.
My memory of writing the books was like my memory of being in college or grad school. In school I felt that every free moment that I had, I should have been studying. When I was writing the book, I felt that ever free moment I had I should have been writing. Given the hours I put in over a period of about a year and a half, I’m not sure that I made the minimum wage.
The reason that many of us do choose to write a book is to build our professional reputations. I’m not sure that books are as effective as writing papers or giving talks at conferences. It may be the topic, but I’ve met more people who have read my papers than have read my books.
All this said, I may write a book on scalable web applications, using nderground as an example.