I don't know about everyone else, but if I publish something as open-source it's because it's something I made and needed in the first place.
Open-sourcing it is just a way to enable other people who have an itch to scratch to be able to do so. More often than not, such scratches comes back benefiting me as the original author.
I don't get this fixation on everything having to be profitable, but then again I don't work on any FOSS projects full time. I only do it to scratch an itch, to make the software work for me.
And when it works... I go do the actual work I'm paid to work on, using the software I've helped make better.
At the time I was thinking "Yay! I'm famous! My code is good!".
Over the years I've seen some of my code, not much of course, end up in other big projects and I'm a little proud, and a little pleased. The fact that the company got the money and not me? Doesn't bother me in the slightest.
I write code for me, and if I get bug reports that prove other people used it then I'll try to improve things. Money just isn't a consideration, although I have linked an Amazon wishlist in a few places over the years, and received unexpected books/films which make me smile.
If you look at the mailing list with the announcement, it was "look ma, no hands" kind of moment. Just letting people know of his experimental project, with entirely no expectations if it growing as much as it did decades later.
That's not to say Linux is a good example to go by, for an average free software project.
If you don't want people to use your work, don't publish it. Publishing has the totally selfish goal of getting others to help you by trying things out, report bugs and improvements and some of them to contribute those things to you. Don't publish if you don't care and just want mobey out of it. Then open source is not for you.
You think Linus Torvalds wanted donations when he published Linux? Or that he was in a particularly philantropic mood? No way. He did it to get other people to work for him. And it turned out great for the project! That he is now making a living with it is just a side effect.