How do you know it’s significantly better quality if you don’t know any of the “how”? The quality increase seems relative to the garbage you start with. I guess as long as you impress yourself with the result it doesn’t matter if it’s not actually higher quality.

I don't think "quality" has anything like a universal definition, and when people say that they probably mean an alignment with personal taste.

Does it solve the problem? As long as it isn't prohibitively costly in terms of time or resources, then the rest is really just taste. As a user I have no interest whatsoever if your code is "idiomatic" or "modular" or "functional". In other industries "quality" usually means free of defects, but software is unique in that we just expect products to be defective. Your surgeon operates on the wrong knee? The board could revoke the license, and you are getting a windfall settlement. A bridge design fails? Someone is getting sued or even prosecuted. SharePoint gets breached? Well, that's just one of those things, I guess. I'm not really bothered that AI is peeing in the pool that has been a sewer as long as I can remember. At least the AI doesn't bill at an attorney's rate to write a mess that barely works.