Since the beginning of time everything that is unknown is associated with gods; if its raining, then its god of rain that won the day, if its sunny then god of sun kicked the god of rain’s ass and dominated the day, until both of them got kicked by god of night, and the loop continues…
A few thousand years later, a few dozain gods are replaced by one god instead, humans have scientists now, they know a lot of new stuff, the amount of unknown is much less, so 1 god is enough for them.
Current times, you rarely see people who are still extremely religious, excluding the new born Christians in the US and some super exploding Muslims , most people now just believe that there is a god that protects them, but they most of them do not think that when there is hurricane then he is angry or in a bad mood, then she just associate it with natural phenomenas.Believing in a god now is just a matter of comfort, because if any person bothered to read some books more than his bible or Koran they would know that there is no god. Reading about all the different religions over time and how each religion steals from a previous and neighboring religions, add some salt/pepper cook it a bit more would be proof enough. But I guess most people just want some assurance that somebody is watching over them and that’s all this praying and being “good” religion wise is not gone for nothing and they will be rewarded later when they die.
Future time? I just hope that religion and its mean of controlling humans and make them walking zombie disappear completely, its just a way to restrict how much people are capable of doing by giving them all the guidance they need, closing their minds, stop them from asking and researching.