It’s a fact of working in software that at some point you’re going to work with legacy systems.
There are many different ways to define ‘legacy system’. In Working Effectively with Legacy Code, Michael Feathers defines it as any untested system. We might also consider any system where the original developer has moved on to be a legacy system. We could even argue that anything written more than six months ago is legacy code.
Regardless, we all know what legacy systems look like. They often have very messy code. Their abstractions can be quite leaky, with different layers being accessed either indirectly or directly.