If your goal is profit then giving away your work for free isn't a good strategy.

What you gain with open source is free distribution and advertising (public git, free advertising in the form of package.json, mentions in readmes, articles demonstrating your code, and so forth). OS maintainers are also gifted free labor (I didn't read anything here about profit sharing with contributors/debuggers, or how that might work, or even if it could work). It may not feel nice, but if you're going to question the economics of a market you need to be honest about cost and value.

In fact OSS maintainers are massively subsidized by the community, by large companies (like Github) and so forth. And this is an automatic cost subsidy that operates outside of value. Most OS software has little (or negative) value, yet is allowed to survive, when in an open market (where it costs something to maintain market presence) most OS projects would be eliminated, reducing the massive cost to teams and companies doing the (free) work and assuming the large risk of eliminating bad products, work a real market would have done for free, by voting with their power to install (or not), ie. buy. If I install one NPM module I am essentially "blackmailed" into installing several others, which may introduce hidden costs that only I will be responsible for (and not the original product creator). It cuts both ways.

It is also disingenuous to elide the real financial benefit of maintaining a popular OSS product. A fair analysis demands a clear accounting of year over year income growth to OSS maintainers able to convert the (perceived) demand for their products into higher wages or other payments for their time in terms of design, engineering, community management, and so forth.

I feel the "good cause" argument is being misappropriated. If you believe in software and making the world a better place through development and sharing then there should be a dot at the end of that sentence. I write books (don't do it!) and give away a lot of software (do it!) because I think freedom is at the end of that work. I'm happy with that in this margin-focused, "if you're not making money you're a nobody" world. The relevant progenitor here is Stallman, not Smith. Idealism is low margin, typically.

Facebook and Google release a lot of open source software. Why aren't their Patreon numbers through the roof? Should they be? Have you used Linux? Git? Why haven't you paid Linus something (a lot!)? Still getting nagged on your code editor about paying for a license? Why haven't you paid it? Why aren't businesspeople who also give away their software for free (for a time) being paid by every single consumer using their software (see: https://www.sublimetext.com/buy?v=3.0)? Why is nagging even necessary?

There is more. Will a hypothetical "deserving" maintainer add features based on the requirements of her sponsor(s)? Will bug fixing priority be determined based on sponsorship amounts? This already happens. And it should! But that's a very different game, and please don't claim that this special class of human beings is beyond corruption. Beware the person who claims their purpose in making and giving away free stuff is "love ️ ", and then later asks for a donation. Cults work that way. Drug dealers work that way.

That being said, please do make money if you can. Money you earn. By delivering rare value that you can convince someone, at your own expense, to buy. Like everyone else. The consumer isn't obligated to pay for what they can get for free. If you are upset about the lack of income, stop doing free work. Those who intend to pay nothing for the OSS they use are "less ethical" in no way whatsoever. And claiming to deserve what amounts to charity isn't convincing to me, given that I expect every single one of the people who benefit from say the top 100 repos earn six figure salaries and may even get a free lunch, every day.

Keep giving. Be kind. Share. Don't covet.