That’s a great point! Professional developers think like that.
However, there are not only high-level developers in the market. The rest of the world does what it’s capable of doing.
It's the companies’ responsibility to hire high-level developers and make the junior ones grow. Otherwise, recovering from technical debt almost immediately becomes unsustainable.
That’s the technical debt root cause.