Cognitive dissonance

The state of having thoughts that are not consistent, especially relating to beliefs, behaviour and attitudes (Oxford Learner’s Dictionary).