I think we humans at some point developed a brain capacity that allowed a sense of self, and the facility to 'put two and two together.' This certainly was beneficial to our survival. A side effect, was, I think, religion.
As early thinkers reveled in self, and pondered on how thing links to thing, and noticed some arch to the cause of birth and death, they started hitting questions like "wait, what the heck is going on here?" What is the bigger picture, what is the cause of all this and me. What governs when I die, and war, and famine? Given the data they had, and their level of experience at proving things, religion was born.
Religion is basically a belief in some sort of human affecting agent that is something more than passive, that is, in some angles, human, that cannot be in physical, witnessed, conversation with you, and also includes the ritualistic trappings that go into servicing this agent and the schema of its processes.
The Buddhism I profess, is the Buddhism that acknowledges a great unknown, but does not try to fill it with too many stories. It is the stories we chase that bring suffering. A story being anything that is not 'now.' Part of the puzzle is that this 'now' includes a creature with a disposition to have religion, and that is part of the flavor in the soup.
2 days ago