I'm not sure it's about money. This maybe be increasingly hard to imagine in this age of AI-slop, but some devs actually don't want to publish code that is a terribly embarrassing mess, and prefer to clean it up first.
I know, but not everybody knows or agrees with this. The idea that when someone doesn't put their code online it must be because they want money seems way off the mark to me, and that's the only point I was making.