The Principal And The Pauper has been described as a nonsensical meta-comedy that betrays the nature of the show itself. Principal Skinner is celebrating his twentieth anniversary as the head of Springfield Elementary, when an army veteran crashes the party, claiming to be the "real Seymour Skinner" and that the fans' beloved character is an impostor.
The reason this episode is particularly dreadful is twofold: the first is the destruction of an established character that the fans have come to love, which is not a major sin as you think (it happens all the time, after all). But the second reason why The Principal and the Pauper is one of the show's worst episodes is the final joke.
The town deport the 'new' Principal Skinner, and Judge Snyder decrees that the impostor will again be referred to as Seymour Skinner and that no one shall mention the name "Armin Tamzarian" again, "under penalty of torture". This is the writers essentially setting the canon back to its factory settings, similar to the "It was all a dream" cliché, meaning that viewers have basically just wasted the past twenty minutes.