It takes jobs because executives push it hoping to save six figures per replaced employee, not because it's actually better. The downsides of AI-written code (that it turns a codebase into an unmaintainable mess whose own "authors" won't have a solid mental model of it since they didn't actually write it) won't show up immediately, only when something breaks or needs to be changed.
It's like outsourcing - it looks promising and you think you'll save a ton of money, until months or years later when the tech debt comes due and nobody in the company knows how to fix it. Even if the code was absolutely flawless, you still need to know it to maintain it.