I remember when I first started out programming 20 years ago, there was time to craft good quality code. Then there were more and more pushes to get more code out faster, and no one really cared about the quality. Bugs became part of the cost of doing business. I think GenAI for code fits well in the more recent paradigm, and comparing it with hand-crafted code of yore is a bit disingenuous, as appealing as it may be, because most code hasn't been that good for a long time.
I am sad to admit it, but AI is just fitting in where poor coding practices have already existed, and flourishing in that local maxima.