For people who want to take the time to write books that have a guaranteed audience (or risk a quick indication of lack of interest) there are a couple of sites. In the US (and elsewhere) there is Kickstarter. It does more than books (and can be quite addictive). In the UK there is Unbound. Unbound focuses on books. The idea of both is you pitch your book and people decide if they are interested. If so, they pledge money and if you reach the goal, the project goes ahead. (Mainly with Kickstarter, Unbound may be slightly different.)
Of course it helps if you promote your book/project to generate interest. There are many books out there on how to utilize Kickstarter, but one that I know is written by two people with successful projects is Kicking It by Monte Cook and Shanna Germain.
Me, I’m trying to go the traditional route.