> It means that all future developers will have to spend a lot of time to understand complex code that could be simpler...
I've seen this story over and over. I'd argue that the following story is much, much more likely than "devs were in a hurry and wrote bad code":
Developer comes in, understands the happy path, asks why there's so much code, starts advertising how they could rewrite it. Once they get the green light, they quickly implement that 80% happy path.
Best-case scenario for tech, business is somehow convinced that this new thing is shiny enough that they give the go-ahead. [0] Manual workarounds are implemented for the 20% of unhappy path processes. Eventually, business will start asking for the system to automatically cover more and more of these unhappy path cases. End result: The system becomes a complex mess of code to handle these multiple edge cases. But hey, it's at least a different complex mess than before!
Lesson: The code is a mess because it's encoding a messy business process full of one-offs and edge cases. Rewrites of systems like this only work if the business process is simplified in parallel with the redevelopment effort. If the business process remains unchanged, the code will reach the same endpoint. Worst-case scenario, everyone will saw-tooth oscillate every few years between "shiny, fast, and 80%" and "old, slow, and ~100%". (Worst-case because it allows for the minimum amount of ROI extracted from the technology for the same business process.)
[0] This is already pretty unlikely. More likely, business is not willing to take on that work, and will demand 100% of current coverage. End result is the same, just now it happens all at once instead of sneakily over time. It's up to political and cultural inclinations whether this becomes a kill shot for the rewrite. Some places will force it through anyway, while others will see the writing on the wall and just end it.