Quote Originally Posted by AdrianII
This is known as 'cognitive dissonance' ever since Leon Festinger and research associates baptised the term in A Theory of Cognitive Dissonance (1957). Briefly put, it says that people refuse to learn or accept facts that contradict what they already know or think they know.
That's not entirely correct. Cognitive dissonance is most often used to describe changes of attitude. But you're correct that it applies here. Cognitive dissonance is about that behaviour is stronger than attitude. If you perform a behaviour X it is not easy to maintain the attitude that X is wrong. That means attitude changes to reevaluate X as positive. Likewise facts are ignored when they would mean that past behaviour had been wrong.
It is not so much the attitudes that lead people to defy counterevidence but the effort they put into defending these attitudes.