I don't think it's because "agents write better code". Agents can write good code and carry out a singular vision faster. Tech debt from human is basically because we write code slower than management change their direction, and speed matter more than cleanliness.
I have a feeling most of the recent app rewrites are like this. Write it from scratch, leave all the technical debt and bad patterns behind, and suddenly it feels like the most responsive app on your phone. Not really a technology problem, more that agents just write better code than we do.