It’s actually the company’s problem. They usually opt to add more debt though, rather that wade through the old stuff.
In the end, all software sucks and should be replaced as soon as possible. Code quality is a lie we tell ourselves so that we can sometimes be proud of our work. It’s usually the code we are most proud of that is the worst. Design patterns everywhere making the vode overly convoluted and “future proof”. The only future proofing that happens is that no-one will understand it, so they won’t change it. Trying to design for the future usually makes it harder in the future.
It’s even worse when you can tell they really tried and still end up with spaghetti. Even mid- to senior developers do this. Rhe more senior they
claim to beare, the more embarrasing when you have to get the stick.Some people try to be so clever with fancy design patterns or bit-tricks, instead of just solving the problem, you now have two problems and a solution to one of them.