“The engine that drives self-justification, the energy that produces the need to justify our actions and decisions—especially the wrong ones—is the unpleasant feeling that Festinger called “cognitive dissonance.”
Cognitive dissonance is a state of tension that occurs whenever a person holds two cognitions (ideas, attitudes, beliefs, opinions) that are psychologically inconsistent, such as “Smoking is a dumb thing to do because it could kill me” and “I smoke two packs a day.”
Dissonance produces mental discomfort that ranges from minor pangs to deep anguish; people don’t rest easy until they find a way to reduce it. In this example, the most direct way for a smoker to reduce dissonance is by quitting. But if she has tried to quit and failed, now she must reduce dissonance by convincing herself that smoking isn’t really so harmful, that smoking is worth the risk because it helps her relax or prevents her from gaining weight (after all, obesity is a health risk too), and so on.
“Dissonance is disquieting because to hold two ideas that contradict each other is to flirt with absurdity, and, as Albert Camus observed, we are creatures who spend our lives trying to convince ourselves that our existence is not absurd. At the heart of it, Festinger’s theory is about how people strive to make sense out of contradictory ideas and lead lives that are, at least in their own minds, consistent and meaningful.

— Excerpt from Mistakes Were Made (But Not by Me), Carol Tavris & Elliot Aronson