Yup, that is absolutely why I do this. I'm not sure it would be possible to keep this up without an intense curiosity about these topics :)
There is also a selfish aspect to it. By writing the best book that I am capable of, I learn this stuff much better than I would by playing around with it for a day or two.
Motivations and results feed each other and (hopefully) produce great results.
Do you, kind of like Sal Khan (of Khan Academy fame) feel curious to know more & more stuff, & then want to share your knowledge & understanding with the rest of the world, by writing books ?
Context : my comment above http://news.ycombinator.com/item?id=3904024