The main answer is that we have only a limited ability to modernize existing programming languages. For example, most languages are not null safe, because most languages are old and we can't make them null safe without breaking backward compatibility with most existing code. And we can't break backward compatibility for practical reasons. So Java will never be null safe, PHP will never be strongly or statically typed, etc.
So for fundamental language features, replacing older languages is the only way to achieve progress. Unfortunately that's a very slow process. Python, the currently most popular language, is already over 30 years old.
It's not just 30 years old. It's 30 years of people building libraries of useful code. If you "modernize" it so that much of that 30 years of work is thrown away, that's really expensive - maybe more expensive than continuing to build on a less-than-perfect foundation.
But that turns into the trap of short-term thinking - eventually you reach the point where you would have been better off throwing it away and starting over. You don't reach that in the year you throw it away, though, nor in the year after.
That CAN turn into the trap of short term thinking. However if you keep investing in modernizing over time you can get most of the benefits of updated code without having to scrap everything.
The catch is you will also have a bit of old code that cannot be modernized reasonably, and new code has to somehow interoperate with it. Which means languages can't break anything because it might be the one thing you can't figure out how to not use anymore even though you know better and would do it different if you started today. Worse often the problem is an early design decision and so the bad practice is everywhere and you can't get rid of it in any one place because everything depends on it.
The main answer is that we have only a limited ability to modernize existing programming languages. For example, most languages are not null safe, because most languages are old and we can't make them null safe without breaking backward compatibility with most existing code. And we can't break backward compatibility for practical reasons. So Java will never be null safe, PHP will never be strongly or statically typed, etc.
So for fundamental language features, replacing older languages is the only way to achieve progress. Unfortunately that's a very slow process. Python, the currently most popular language, is already over 30 years old.