I have heard authors making as little as $500 and very rarely someone making more than $5000 from technical/programming books (outside of top 1% books). Given you easily put 500 hours of work in a book, the best possible outcome for vast majority of authors is literally minimum wage payment. Most authors are competent enough to make 5X more on their regular jobs so they are certainly not writing book for money.