Peeples, it doesn't just happen in religion. It happens with any topic to which a person becomes fervently attached.
This creates a "survival interest" in the individual. When ego gets bruised, the person suffers mentally as if they have been injured physically (which of course they have not). They will defend their prized viewpoint to the death.
When you know how to recognize this malady, it's almost funny to see it in a scientist, politician, military officer or anyone else not at all religious. Funny, but sad.
Take science, for instance. The "Clovis First" dogma in American anthropology a few years back was almost a religion in it self. Scientists who dug below the Clovis horizon were ridiculed. This took me by surprise. Science by ridicule? Yes, it happens. All too often. Now, Clovis First is dead. The mavericks in science were able to find numerous sites far older than Clovis, and even in South America. Those who did the ridiculing were living a delusion.
When 2 scientists came up with cold fusion, the scientific establishment went berserk. But now, quietly, behind the scenes, a few mavericks in physics are finding out why others were unable to duplicate what Pons and Fleischmann were able to do in their own lab. Microscopic imperfections in the terminals were critical for those failures, but invisible to the naked eye. Again, the ridiculers were living a delusion and stopping progress just to protect their egos.
When NIST scientists committed fraud to protect the government's story of 9/11, most everyone else went along with their delusion. But people are slowly waking up to the fact that the government cannot be trusted. It wasn't just those lies about WMDs. There is one very powerful group who are masters at shaping public delusion. They play our egos like a symphony.
Even moderates in religion can be delusional. Anyone with an ego to protect is going to bend their own perception of reality to give their ego the best possible protection.
Ego really is an equal-opportunity destroyer.