Yes, because commercial publishers are only concentrating on big money (like Happy Potter) or textbooks. They see it as risk. In some cases like Cactus & Co with the book on Lithops, they took the financial risk of publishing the book in two languages. To recover their money, after a few months they sold all the English copies to a South African company, which must have made good money out of it. They kept the Italian version for members only. There are a handful of these copies in Italian still for sale.
Yes, the authors take a gamble on making money on books. However, before they pay the printers, presumably in installments, they offer the book at a pre-publication discount, like Robin Frandsen did. With the earnings from the pre-publication sales, he must have covered most of the printing costs due to a company in Singapore. The book became expensive because it doubled in price on shipment costs. Commercial printers probably have shipping agreements to deliver books at a discounted rate compared to us.
If a person writes a book on plants, s/he will have a feeling about how many copies can be sold so s/he will not be out of pocket for long. S/he will just ask other authors before getting stuck into writing most of the book. In the case of Steve Hammer, I am told he has benefactors behind him. He also uses the upfront pre-publication sales format.
I tend to believe that these authors who publish using their own money will probably earn several thousand dollars on their books. However, they won't become rich on them. Considering the amount spent on writing and editing the book, the earnings do not justify the time invested. Authors write books for their own glory, in my view.