Those bugs (assuming validity) were there in spite of the careful curation. People tend to do what they can to the best of their abilities. Before compilers did much in terms of static checking a lot more errors made it into production than today. Better tools -> better code.
Whether AI written code is going to be better in the longer term remains to be seen. With what I've looked at so far I'm not super optimistic about this.
Better than what? 99% of stuff produced by humans is a garbage. Arguing about "abilities" or compilers does not change that.
LLMs reliably avoid whole categories of bugs, some of them the most serious offenders in terms of impact.
To me it has become clear that LLMs will, on average, improve the code quality by a lot.