I have worked on compilers and databases the entire world runs on, the code quality (even before AI) is absolutely garbage.
Real systems built by hundreds of engineers over twenty years do not have clean code.