Fixing broken projects is a super valuable skill to have and can be rewarding in its own way. I've reached the point where I hardly ever say "whoever wrote this was an idiot" and see why it ended up that way in the first place. More than code debugging it's also social and process debugging. You can probably tell by this point I also don't mind this kind of work (anymore).