Then leadership isn't capable.
I wonder if it's simply the balls to tell top management that we need to invest in training, refactoring etc. And selling it that it will payoff.
The usual answer I get when I propose this, is that "we're too busy with projects".