LOL hysteria? That's like akin to mental illness.
I disagree. Religion came about because people needed answers to their questions about the world around them. It's part of human nature to be curious. Since science wasn't invented yet, they needed an explanation as to why the sky was blue and all that. In the end, religion is about telling stories.
I generally subscribe to this as well. The earliest evidence of religious ritual is found in paleolithic burials, which show signs of having some sort of carefully ritualized preparation of the deceased, going as far back as 200,000 years ago or more. It's as if there's the belief in the possibility of life beyond this one.
But that's only one aspect of religion, which is not only preoccupied with the dead but also with the living. Religion is also a binding cultural force, which I believe is something that's expressed through not only rituals but also songs, dances, paintings, and other forms of artistic expression. There's a symbolism that is expressed in religion, a symbolism that communicates the message "This is who
we are, this is how
we live."
In evolutionary terms, religion gave homo sapiens some advantages over other species, and perhaps over other hominids, including Neanderthals. My own hypotheses are (I think) similar to what the OP expressed: religion's initial advantage is that it enabled humans to overcome their heightened awareness of the dangers around them, and their heightened awareness of their own mortality.
Whenever we finally learned to communicate - through grunts, drawing lines in the dirt, or however else - the idea that one day we will die (and oh by the way, that could be in the middle of the night if some pack of hyenas are around)..whenever we came to that level of awareness, we needed some way to deal with it. Maybe we succeeded over other hominid species because of this ability. We're finding in DNA tests that there are several 'ghost species' - species of hominids that were comparable to humans, and almost certainly interbred with us, but for whatever reason, died out. Maybe this is the reason. We were more intrepid than they were, and maybe our spirituality enabled us to achieve what we have.
But on top of that, I go back to the community thing. For most of our evolutionary history, survival was a team sport. Spirituality made the bonds of kinship that much tighter. It inspired a togetherness that is seen in what they left behind on walls in France, and in what they left behind in how we care for our families and closest friends. Over time, that became hardwired as a survival advantage.