Religion is easily explained by mostly one thing, there are lots of other things you can offer as well, but it's primarily due to the human animal having a large primate brain unlike any other animal.
Because we have such high order intelligence and self-awareness we are aware of our mortality and the mortality of everything else living, human or otherwise. We are the only animal that understands through the majority of our lives that you live and then you inevitably die, perhaps there are a handful of other species that may have this awareness, but not to the degree we do. Also through our lives we witness the loss of other humans, close to us or otherwise, and again because of this large brain capable of emotion, we experience that loss profoundly.
This large brain also allows us to possess empathy for other living animals, experience the loss of those close to us with deep sadness and possess a fear of death no other animal does because of our awareness of its inevitability - rather than most animals with a simple instinct to avoid danger and predators. This same empathetic center is the explanation for why most of us are uncomfortable with murder, theft, rape, hurting others or what have you. It has nothing to do with religion, the created moral tenets of the various religions are just a reflection that humans have always possessed this empathetic center in the brain.
Religion is an attempt to come to terms with our mortality without confronting the uncomfortable, for us, truth that eventually we and those we love all die and are gone forever. That big primate brain also gives us our imagination which lets us create all sorts of high order fantasies and mysticism related to nature. Other examples are things like an irrational fear of the dark even when you're in your own home or hearing creaks in a house and coming up with stories about ghosts. All a product of the imagination running away with things. This same imagination is what can let you look around and 'see' the proof of religion in the world around you. Nature is amazing, it's going to be difficult when you don't know everything about it, and have this great imagination, not to try and explain it with mystical origins.
If you look at the time when the prevalent religions were created, people then had no understanding of the nature of the universe and how things worked. It was easy for ideas of some sort of magical underpinning to everything to come about. Naturally these would be related to where we came from and how everything started. Today in these more advanced times we still are trying to answer these same questions, but now we have the benefit of greatly advanced technology and science to get to the real truth of it, rather than make up mystical stories and events to explain it we have actually started to slowly figure out the truth of it.
I expect if human civilization manages to continue to thrive for a good deal longer that religion will continue to slowly decline and eventually become a fringe. It's unfortunate that in this day and age you can't even be a viable candidate in politics without affirming you believe something that has no evidence to support its existence. A testament to how difficult it is for humans to accept that we are just another animal that through the fruits of evolution became exceptionally intelligent, and just like the other animals we all die and that is the end of things for us like it is for the other species.
I don't disbelieve that there is the possibility of a sentient creator of all the universe, benevolent or otherwise, there is just no evidence one way or the other. So right now it has no more credence to it than any far fetched tale anyone could dream up and write down on paper with no evidence to support it. As far as the current major religions of the world, none of those books are explanations for how the universe came into existence.