I'm convinced this is what most tech oriented books are about, not so much about earning money from a book, but putting "Author of xyz" on their CV and website; "you literally wrote the book on xyz, you are an authority on xyz"
The famous mathematician Vladimir Arnold said (approximately) “the best way to learn a topic is to write a book on it.” He did that a few times in his career — most notably his excellent book on classical mechanics.