I suspect it's far more about workflow and developer attitude. Messy code stays because you don't object to it staying; overfitting happens in code because it happens in prompts.