I don't think this is an accurate comparison. Working on open source software means you are contributing to that software, which yes may be used by for profit companies. This is more analogous to contributing to Wikipedia, which is then used by for profit companies like Grok, than it is contributing to Grok products directly, which cannot be leveraged by other tools in this ecosystem (afaik).
Not the person you are replying to, and it is a bit tangential, but you just basically described a solid chunk of open-source software work.
I am not mocking open-source software work, I am mocking how reductionist the parent comment was, because their logic often applies to volunteer open-source software work as well. And, I suspect, on HN we can agree that volunteer open-source software work can often be worth doing, regardless of how "irrational" it is or how much for-profit corporations could benefit from it.