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.
There is nothing bad with messy code unless you work with a team. Showing that you coded messy code doesn't make you a bad coder.
There is nothing bad with messy code unless you work with a team. Showing that you coded messy code doesn't make you a bad coder.