TBH, I haven't looked into exact numbers in a while, but the way I recall it is that for a Kindle book, you get 35% royalties. So in your case, if a book sold for $30, you'd get $2.6 for that book, which is already not great. If you factor in publisher expenses, taxes, maybe advances, etc., you may end up with a very low amount, depending on how exactly your publisher calculates these.
Tech books tend to not sell very high numbers (a book on a niche programming language is considered quite successful if it sells 10k copies), so it's important to make a good amount of money on each individual sale.
So for me personally, Kindle sales in particular are essentially worthless. Let's say I end up making 2 bucks on a Kindle sale (which is more than I make on average). If I sold 10k Kindle books, that would be 20k income for me, which is simply nowhere near enough to justify the effort of writing a book.