I would guess you work for a larger company. My experience is more that someone had an idea or got a short description of a problem and then went off and asked Claude to help write the spec before letting Claude implement that spec. The code is starting to be good but often it is way to much code and some times for bugs it is fixing the symptom not the underlying problem. I have several times rejected PRs with, this isn't fixing the actual problem or instead of these 400 lines you could change that one parameter to the existing function and get a better result.
/end rant and back to another day with code review of AI code
It can because to actually write the code, you need to be good at formal logic and attuned to the sequential nature of the machine. Some people are good at it intuitively. Some brings it over from some other domain. But some people have a lot of difficulty grasping such abstraction. They know the elements, they just can't order them in a logical manner. That's why you often see horrible code (the long function, the god class, magic number) and copy-pasted snippets all over the place. The computer don't care (they made it work somehow), but it's unmaintainable code.
That's where the horror stories comes from. The software works, you can see the design from the user point of view, the database is ok, everything in the middle is spaghetti. And the cost of maintenance just keeps growing.