Religiosity is inevitable and has a lot to do with how humans are born. Due to our large cranial structures our newborns are born premature. The brain is not fully developed. For the next few years we are unable to do anything by ourselves. Other animals are up and running in just a few months.
For that elongated period humans are depended on a caretaker. A cry serves as a prayer for food, sickness, cleaning diapers and everything else in between. A godly hand our of nowhere comes into service to offer a solution. This is how religious thought is imprinted in our early non-fully developed brain.
Later on we invent fictional friends so we can have tea-parties with characters that are not there. This magical thinking is vital for our communication. We can talk about someone that is not present as if they were. We construct their image in our brain. This is how religious thought comes to be. This is how belief emerges. From that first magical hand that pops out of nowhere and translates our needs and wishes into action. Thus, our brain is growing in a way that reconstructs and invents reality based on belief.
Even if someone is not religious we still believe silly things. The greater example is love. There are billions if people on earth yet we believe that the few we meet can produce a special someone that we will love more than anyone else. We see those people entirely different even if they are just like everyone else whom we haven't come close yet. It is as big of a belief and irrational thinking as religion.
Another example is belief in the experts, no matter who they are. We believe for example in the big bag theory as described on TV with fancy graphics and all, without us even understanding the basics of physics. We believe the expert scientists as much as the religious folk believe the expert priests that tell them about God. Very few perform or can perform an experiment to verify the theory of Big Bang or even care to delve into it more. We are happy believing.
Belief evolves and changes faces but it stays pretty much the same. We just recycle the concepts in our minds depending on cultural and ecological developments.