I really love this analogy by The Oatmeal regarding what our worldview (sometimes undeniably AKA self-righteousness) makes of us when challenged.
Your brain loves consistency. It builds a worldview like we build a house. It has a foundation and a frame, and windows and doors, and it knows exactly how everything fits together.
If a new piece is introduced and it doesn’t fit, the whole house falls apart. Your brain protects you by rejecting that piece. It then builds a fence and a moat, and refuses to let in any visitors.
This is why we have the backfire effect. It’s a biological way of protecting a worldview.