Many companies have buggy code bases that need fixing or refactoring. It's essentially a one time job and once the heavy lifting is done, for an employed Dev the job changes a lot. So working on legacy code bases would work but maybe also offering to refurbish/consolidate
Probably some companies would be happy to offload the risk of a complex refactoring