This is called "Cognitive Dissonance".
Cognitive Dissonance:
“Some people hold a core belief that is very strong.
When they are presented with evidence that works against that belief, the new evidence cannot be accepted.
It creates a feeling that is extremely uncomfortable, called cognitive dissonance.
And because it is so important to protect the core belief, they will rationalize, ignore and even deny anything that doesn’t fit in with that core belief.”