“Cognitive Dissonance”:

Merriam-Webster Dictionary

“Psychological conflict resulting from incongruous beliefs and attitudes held simultaneously.”