In his BBC Future article, Tom Stafford writes:
Fans of cognitive dissonance will tell you that this is why people forced to defend a particular position – say because it is their job – are likely to end up believing it. It can also suggest a reason for why military services, high school sports teams and college societies have bizarre and punishing initiation rituals. If you've been through the ritual, dissonance theory predicts, you're much more likely to believe the group is a valuable one to be a part of (the initiation hurt, and you're not a fool, so it must have been worth it right?).
For me, I think dissonance theory explains why some really long books have such good reputations, despite the fact that they may be as repetitive and pointless as Festinger's peg task. Get to the end of a three-volume, several thousand page, conceptual novel and you're faced with a choice: either you wasted your time and money, and you feel a bit of a fool; or the novel is brilliant and you are an insightful consumer of literature. Dissonance theory pushes you towards the latter interpretation, and so swells the crowd of people praising a novel that would be panned if it was 150 pages long.
Changing your beliefs to be in line with how you acted may not be the most principled approach. But it is certainly easier than changing how you acted.