Three of Twain’s favorite themes are central to “The Man That Corrupted Hadleyburg”: appearance versus reality, the importance of training or habit, and—overlying those two—the evils caused by human vanity. Twain and the stranger both enjoy exposing the town’s lies: Mary and Edward Richards read the Missionary Herald but are too weak to practice charity at home and save Burgess. Hadleyburg prides itself on its honesty, but everyone, including the Richardses, is willing to lie for the gold. There is no real virtue in Hadleyburg, only show.
Real virtue, as the stranger says, requires testing: People must train to resist temptation. Training can be either bad or good: In Hadleyburg, training is for cowardice, rationalization, and vanity. Edward tries to stand against that norm at the end of the story, but by then it is too late, and he only hurts Burgess again.
The reason that it is so difficult to act well is because doing so requires admitting to faults. In his essay “What Is Man?” Twain says that there is no real altruism—man is motivated only by self-interest. That hurts people’s vanity, however, so most people lie to themselves about their motives and morals. It takes a shock such as the Richardses’ guilt or Hadleyburg’s disgrace to break that pattern. After that, people can perhaps learn to enjoy overcoming their weaknesses rather than ignoring them: “Lead us into temptation.”