To protect the beliefs and that sense of identity, rationalization takes place. What’s interesting is that once the rationalization has occurred, dopamine is released, rewarding that rationalization and in many ways reinforcing it. The beliefs are re-affirmed and the threat to personal identity averted.
You see this all the time with religionists and ideologues, that evidence almost seems to cement the beliefs even further. It’s called the Backfire Effect.