That decision was acceptable because of the complete lack of any technical experience in house (100% outsourced, multiple vendors) who had very different patterns of development. Couple this with no tests, no process and no patterns, you're stuck trying to work against something that's unpredictable.
The way forward then is to hire a team (even if it's just one guy) internally who can have ownership of code. Then instituting good practice and a sensible method of rebuild and rediscovery. Obviously this hinges on having enough runway to get into it properly.
tl;dr: sometimes it's ok to scrap it all and start again when your goal isn't about preserving code but instead is about building a better product and technical culture inside a company.
Getting downvotes - I wanted to add something: There's a real risk of making problems worse when you don't have any ability to stop and change. Working with existing code is great but when you have existing customers running into bugs on a daily basis, and fixing them would change the business logic that others are relying on, you either choose to build more technical debt or you swallow it and start again. Obviously this depends on runway, position, etc.
There are many times when companies go through their proto and raise seed only to find that their original hypotheses aren't working, and to change requires a significant re-architecture. Bolting this on to existing codebases can end up with code so complex that it won't stay up, and you end up spending six months in pure fire-fighting ops mode to keep the thing alive. Knowing when to recognize this and acting accordingly is the right approach, even if that sometimes means calling it a day on the existing code and starting again.