Most people write open-source for material reasons -- it lets them bring some of their own code into a new workplace, with minimal employer resistance. Also, many people will try to open-source the tooling they built at work so that they can then take that tooling with them to a new employer (avoiding the duplication of effort and potential legal issues).
All of the open-source code that I wrote for non-material reasons, I wrote it because I thought it was fun to write, and I open sourced it because others might find it interesting or useful. But I never expected any kind of recognition (let alone compensation).
In feudal Japan, poets would write poetry anonymously (not pseudonymously), and many historians and scholars debate which known poet wrote which poem. The fact that these works of art are not attached to any author's ego or name, does not diminish their beauty after all these centuries -- arguably this characteristic amplifies and elevates the work beyond the history of people, to the history of ideas and concepts. At the end of the day, we are just transient conduits for concepts. The notion that a person deserves to have "more" for their ideas and concepts and artistry, is as shameful as the notion that artists deserve to starve for not slavishly serving the whims of the market.