What is the purpose of religion? Why did it originate? Such a question is important to answer in being an Atheist, not so that one might convert back into these antiquated concepts, but so that we may understand individuals who still adhere to them.
The Theory
So lets get to my theory, what are Homo sapiens known for, our ability to adapt tools that allow us to conquer our environment, no? It follows that religion is a tool like any other. Before anyone yells, "Religion is not a wrench!" allow me to explain myself. Tools allow us to more efficiently accomplish a given objective, and that is exactly what religion has done. It is simply an old con that says, "Follow my set of virtues, and you will be rewarded greatly; refuse to follow them, and you will suffer eternal damnation." The same concept has been used by secular rulers since the dawn of time, but has never come anywhere close to the level at which religion accomplishes it. Whereas secular rulers must enforce their viewpoints through tangible punishment and reward, religion actually accomplishes this task without laying a finger on them. (For the most part, I am not foolishly claiming religion does not kill people, I am referring to people who choose to passively follow a religion.) Religion replaces many actions that would take time and effort by having followers metaphorically follow the breadcrumb trail. For humans, this equals efficiency, this takes coherent thought, throws it out the window, and establishes peace within a region. Instantly successful ruler, boom.
Patton Oswalt does a good job of lending comedic relief to my point:
The Issue
He also hits upon a point that I wish to articulate, and give a different perspective on, the fact that religion obviously causes wars. Why does it cause wars? Because a lot of fairly intelligent con artists set up the same scam and changed certain details based on the area and the time. But what is even more exposing, is how rulers, priests, and the like have used this fact to their advantage. It became the only reason needed to start a bloody conflict. To quote Oswalt: "The one guy would walk off of the boat and say, "Hey, did you hear the good news about the sky baklava?" and the first guy went, "It's cake, mother fucker, you're dead!""
This lends a whole new purpose to religion. Now not only can you bend people to your will and your way of life, but you can have them run off and die for you as well. No justification needed, just, "My God is better than your God!" and boom, whole war in the making. Families unwittingly send their children to die because it is in the, "Name of God."
Then there is the third, perhaps not last, but what I consider the most pathetic purpose. I have seen personally, and I am sure many in the audience will agree, religion used as a sort of shield, from the reality of death. On an individual level, many people can not handle simply dying. To not exist, to never be again, scares them so badly that they need an alternative route. Religion provides that belief system which in turn is the alternate route. Instead of just dying, there just so happens to be this perfect kingdom set up for specifically humankind that provides for all of our needs. Sounds as though it was written by a children's story writer, when taken out of context. (And personally when in context.)
A Twisted Con
But what does any of this have to do with why people still hold tight to their beliefs? In today's society where most morals that once were not built in have been conditioned into us, religion is not so much a valid tool. But reexamine the previous reasons and it is fairly clear it still serves a purpose. I will give the example of the current situation in the United States. One would have to be blind to not see the gridlock that currently exists. But why does that gridlock exist? Polarization. A strong amount of that polarization has occurred because certain parts of society feel their way of life is being attacked. Much of this can be attributed to the use of religion to convince individuals of a certain political view, and when a staunch believer connects that with their political views, they will no more change their political views than they would their belief, regardless of what rational evidence you can provide. This allows politicians an easy way to get elected and try to force everyone to their perhaps extreme views.
Religion is also not done starting wars, and I doubt ever will be. The Middle East and parts of Africa are all rife with conflict, in many cases due to religion. If anyone attempts to tell me the United States involvement in the Middle East did not involve religion, I may smack them politely over the head with a sledge hammer.
The Obvious Answer
The most obvious answer to why religion still exists though, is that individuals are still afraid of death. I spoke to a person about their fear of death but moments ago. It is a hard fear to rationalize. To our core humans fear the unknown, for the most part we prefer light to the dark. Death is the ultimate in unknown, it is a state that once reached you do not often live to tell about. So for many, perhaps the majority of people out there, religion is the shield that allows them to avoid their fear of death. Unfortunately that shield is not one worth bearing.