Cognitive Dissonance: The Belief Moves Because the Action Cannot
When what you did clashes with what you think, one has to give. The action already happened and the belief is private — so people end up sincerely believing whatever justifies what they did.