In my (extremely not senior) view, maintaining other people's monstrosities doesn't teach the right lesson, because there are many ways to get things wrong, but fewer ways to get things right.
Previously, maintaining someone else's monstrosity taught me to avoid their specific mistakes, but not those classes of mistakes. I'd momentarily feel superior over having a different idea about how to accomplish those goals, only to feel deflated once my idea also showed short-comings.
Better to learn how to reason correctly about these things, and that probably doesn't happen until you take seriously the cost of maintenance, which really only comes once you've spent enough time in those trenches, having dug them yourself.