Why are textbook authors often not the most famous/cited researchers? I am not sure if this is generalizable to all subjects. What I have noticed in some of the sciences, for example biology, ecology, and environmental sciences, is that the authors of the most used textbooks are not very highly cited scientists. Perhaps they have a book which is well cited but not used as a primary textbook, however it is not always the case, as it depends on the level of the book. Of course, books written for undergraduates are not necessarily cited in research papers. Regardless of the writing skills, which are of course important, I would prefer a textbook to be written by the most expert of a field and not just by the best educator or writer, who might lack in depth knowledge. Of course, a combination of both would be ideal.

I would expect that the maximum experts of a topic would also write a book which is heavily used in class or in research, but it does not seem to be the case. 

Is it because researchers with a lot of citations (i.e. experts) are mostly dedicated to writing papers rather than books? Or is it because they work at  the edge of knowledge and are not interested or capable of writing books for rookies?
You have already mentioned most of the things that are going on. 


Someone who is good at doing research is not necessarily someone who is good at writing textbooks. These are different skills.
There are only 24 hours in a day, and an hour spent on writing textbook is an hour not spent on research. A person becomes a top-researcher by being strategic in the way (s)he manages her or his time. That often means not writing textbooks (see point below).
The "value" of a book differs a lot from (sub-(sub-))discipline to (sub-(sub-))discipline. Some value books (but even those not necessarily textbooks), and in some writing a book is basically a waste of time.