I don't think the deepest, original, authentic essence of religion is simply a lie we tell ourselves to to distract our attention from our suffering.
It appears to me, rather, a discipline, or practice, we can employ to, eventually, learn how to disconnect a psychological suffering response from the chaos and tragedy inherent in reality. This is to say that real suffering is optional even though physical misfortune is not. But avoiding this suffering is not an innate talent. It is a skill that must be learned by practice, and religion's purpose is to teach that practice. Science is a natural ally to this enterprise; not an enemy.
This purpose may be more readily recognized in non-theistic traditions like Buddhism than in a deity-centered religion like Christianity, but it is there as well if you are willing to see it.
Regardless of what they call themselves, worldviews whose primary focus is on pacifying the neonatal parent-worship instinct into adulthood are not true religions; they are just that; pacifiers.
The central act of religion is to train the individual to release ego-identity, and thereby release psychological suffering regardless of material circumstances. Metaphorical imagery of this act is found in every major world religion. Those who take these metaphors to be intended as historical fact have missed the entire point, whether they be believers or non-believers.
No, the reason is that humans are afraid of dying
Religion was invented when the first conman met the first fool.
Market Twain
Simply put, religion is a business whose only purpose is provide employment for the clergy and support staff..
Were it not for the government sanctioned tax breaks I believe religion would go out of business very quickly.
In my opinion religious institutions should be taxed just like any other business.
Religion does not offer any meaningful education; religion is the perpetuation of a gross lie upon one's fellow human.
What you describe is called philosophy.
Religion is merely supernatural philosophy.
I think the truest purpose - was convincing men to die willingly in warfare. The promise of a glorious afterlife was an effective incentive.
Religion was supposed to be an organized way to know god. The whole conformity thing was a way to keep people from being wild. Look at prisons, how they find Jesus and then become more moral. But religion CAN serve a good purpose, for people who lack organization in their lives. People aren't going to want to go to work and be a cog in the machine, if they know they are just putting a roof over their heads and it's not going to end. Being told if you suck it up while you're down here, you will be rewarded later, because God likes to see you suffer, was a way to keep the masses working for the elites.