Also, plenty gets written under scientific and research grants and such. I paid the rent for a couple years under such an arrangement. I'm pretty sure that's how the original internet software got written.
Didn't writers and other artists have the same in the Soviet Union? Or even here still, for that matter?
Free-as-in-libre doesn't exclude money changing hands.
-- Andy