> Don't give your work away if you don't want people to use it.
This about sums it up.
But at the same time, many people feel like there should be another way to do things. To create code, libraries, frameworks or whatever else that many can benefit from, but there also be some sort of a financial gain to make it sustainable, rather than just a hobby.
Recognition is nice, but recognition won't pay your bills or put food on the table (it may help indirectly by opening up new opportunities, but that's a different conversation).
That's why some are looking in the direction of software that's free for non-profits or non-commercial usage, but requires a license to use commercially, yet that's not as easy as one might believe (bureaucracy and legal aspects), as opposed to ticking a checkbox in GitHub or wherever that would say "i'd like to charge money for someone using this commercially" and filling out some other data. There's probably a company or two out there to make software licensing easier for developers, though.
That said, then we are no longer really talking about "open source" anymore, since we're coming up with limitations of who can or can't use the code and for what, that's more like just source available at that point. That's why licenses like Server Side Public License (SSPL) aren't commonly recognized as open source licenses.
So, in summary:
- if your goal is money (now or in the near future) then NO, open source is not worth it (at least if you expect a degree of certainty)
- if that's not a concern (you have a job) or maybe it's something you just do out of passion or for the experience, then YES, it's probably worth it