>You could go on forever but really it just boils down to someone making bad decisions from inadequate knowledge and lack of foresight.
To what level should a developer be at before joining the workforce?
How do we bring all potential developers up to this level so that we can have a smarter workforce?
Can you create an education system that reliably produces developers at that level?
That's what interviews attempt to do, but since those vary so widely between companies (with some being done terribly), you can't get a coherent picture of what to actually learn that will serve you among the greatest number of companies.
This means that, if you can't answer all three questions above, the workforce at large MUST support bad developers writing bad production code at some point in their careers because that is simply how they learn what is and isn't important to know.
If we can't create this system, then we're all complaining about nothing because there's no way to avoid writing bad production code at some point in your careers.
(I specifically mention production code because conceivably, you could just have them learn and write code in a dev environment, then have that code reviewed, but never let them have much of a business impact. Most of us don't care much if someone is writing bad code in a dev environment because that's meant to break occasionally)