You can simply create out of inspiration, while having a job that pays your bills (that is actually how a lot of OSS happened). Or you could publish some work openly, while suggesting the reader to buy your book, for example.
Over-reliance on ad-based model and the resulting prevalence of double-sided “social” platforms where the advertiser is the customer, actual user needs count for nothing because no one will leave and no honest competitor can compete with “free”, most certainly seems to me to be at the root of a lot of dysfunction—if these platforms make more money from engagement thanks to aggravating inflammatory posts, regardless of whether they are well informed or in good faith, then that’s what they will promote and reward one way or another.
The expectation of “free” is part of the problem, sure, but I don’t think that’s the cause. The cause can probably be distilled to “abuse of information asymmetry in free market enabled by regulatory inaction” (free market is great, but in presence of malicious actors it needs some regulation or it stops working). That leads to the aforementioned platforms, then the expectation of “free” and non-appreciation of work published completely for free just out of altruism or to feel pride/recognition, and generally goes counter to how the market is supposed to work.