I do think there's work to do around both mentally prepping someone for being a maintainer and setting expectations around what one can count on for free, but I don't see this as being peculiar to open source. Ongoing support for independent apps and components can also outweigh the profit, without the ethical freedom to just walk away from a customer if you don't feel like helping them. And don't get me started about working in a typical day job. Everyone wants as much as you're willing to give them, and metering that is a key skill.
Or neither. I create open source libraries because I love to code and because I love to share what I built with as many folks as I can. Idealism, altruism or concern of my reputation is not required. (I can't help but think that the subtext of those terms is "people who do open source in their free time are naive," but that would not be a charitable interpretation. Still, that's the impression I'm getting from your comment.)
Sounds like altruism to me.
I do suspect "what the hell, may as well push it to github" probably starts more open-source projects than any other thought.
I don't think to myself, "I can't wait to get home from work and selflessly help others!" I think to myself, "I can't wait to get home from work and crack open that really interesting problem that I've only been able to give a third of my brain to today." If the fruits of the latter result in someone else saying it's altruistic---that's cool. But don't try to tell me I'm doing it because it's altruistic. I'm not. (Being called altruistic is kind of funny. It's either a wonderful compliment or a condescending snub of youth/naivete. In my experience, anyway.)
FWIW, I suspect we're on the same page. I'm just trying to clarify the point I was trying to make to the original parent, because I think that's getting lost.
Please consider the parent I responded to. It was citing motivation. My motivation is passion for the craft; not impersonal sacrifice for the greater good (even if you observe it that way, that's not what motivates me to participate in open source).
If you have used moment.js in a project then please consider contacting the author with a note of appreciation. This won't solve everything, and won't change the world, but will hopefully alleviate the depression and anxiety of someone who has made your lives easier.
Unfortunately, one can make far more money selling SaaS then to adhere to the definition and spirit of libre and open source software.
I want to have my cake and eat it too, but I can't.
I am actually old enough to remember getting Programmer's Paradise magazine that would have listings for all sorts of VBX/OCX controls from a whole host of large and small vendors that developers could buy to help them accomplish a programming goal.
Now, a single developer or small team can create a small app or website in which free/open source libraries are doing all the heavy lifting in terms of complexity and capture millions(or billions) of dollars in value with the original creators getting nothing.
The main reason for an individual creating open source libraries is due to either idealism/altruism or else to increase their reputation so a company will hire them. My guess is that the altruistic individuals are the ones getting burned out because the users of their code, instead of appreciating their altruism, make them feel guilty and inadequate. Open source will have to solve this issue in order to be sustainable.