Cognitive dissonance
From BurnZero
Cognitive dissonance refers to a situation involving conflicting attitudes, beliefs or behaviors. It is often accompanied by a feeling of mental discomfort as strongly held ideas are often form the foundation stones of ego.
The discomfort caused by the dissonance usually results in either of two behaviours. The most common reaction is revulsion which leads to counter arguments, whether logical or not. The second reaction sometime proceeds revulsion is acceptance which leads to an alteration in one of the attitudes, beliefs or behaviors to reduce the discomfort and restore balance.