Re: "Quality" is a structural attribute, not a bolt-on
I can see your point with agile, but I'd disagree about companies using old code. History shows us that this code wasn't necessarily (and wasn't in practice for most cases) written and tested as thoroughly as possible using wonderful coding practices that we've sadly lost. The code that's still running is probably quite solid given the decades of testing in the field that it has received, but otherwise it's code that can fail as much as any other code. Companies still use it because they have a fear of doing something differently and because why spend money on making the code fast, modern, and perhaps more full-featured when you can not spend that money and instead spend it on the people keeping old hardware and virtualized old hardware functioning?
If they had to change their business practice and modify their software, the changes are much more likely to be written, tested, and put into operation quickly if the codebase is modern. With an old coding system, you need developers familiar with it (fewer people) and ideally people not only familiar in the sense of "I worked on this in the 80's and 90's" but also in the sense of "I can still remember off the top of my head what that hex error code means". Meanwhile, a modern codebase can run on a lot more stuff and can be repaired should it break without needing specialist knowledge.