That's not exactly how it was. I recommend reading "Debt: The First 5,000 Years" by David Graeber. https://en.wikipedia.org/wiki/Debt:_The_First_5,000_Years
I actually know a guy whose job it is to empty septic tanks, and he LOVES telling people super gross stories and leaning into his capabilities as someone to not be bothered by what he deals with on a daily basis. Watch that old show "Dirty Jobs" for lots of other people that think similarly.
Nobody wants to serve someone else's profits for nothing in return. That wrinkle kills a lot of FOSS motivation, when Micro$oft snaps up your project and starts raking in millions without a cent going to you. That's obviously unfair, and one things humans are very good at is telling when something isn't fair.
My overall point is, when controlling for baseline maslow, and ensuring there's no unfair labor exploitation, in a situation where we need plumbers, someone will be attracted to the vacuum of need, because humans love being needed, and love doing useful work.
But I doubt there are enough to fill the need for them.
I contribute to open source. I made my peace long ago with someone using what I wrote to make money. (In fact, it pleases me if they make money off of it!)
If you contribute to open source, but get mad that someone is using it without paying you, then you did not contribute in good faith. It's like those religious cults who will press a "free" book on you, and then demand a "donation".
You don't necessarily mind people profiting off of your contributions because you have been profiting from other peoples' contributions at your job. Take away the jobs and suddenly there isn't enough grant money to go around to keep the lights on.