Another thread that refuses to die...
To answer the OP question anyway, since I nevertheless consider it a very interesting topic... It's rather easy: because of the advantage of people who are more prone to engage in the type 1 cognition error known as the "false positive".
If you assume that the "noise" in the bushes is from a dangerous predator out to kill you, you run.
Those who stick around to "gather more data", will get killed if the suspect noise is actually such a predator.
This left us humans with a tendency to infuse intent/purpose into nature. That combined with our tendency to recognise patterns everywhere, even there where they don't actually exist, leads us to a mental state in which we are extremely prone to superstition.
This is the psychological underpinning of religious belief.
Religious beliefs didn't evolve. Our psychology evolved. Religious beliefs are then just some kind of secondary side-effect of our psychology.
Such psychological underpinnings are very common in nature, in animals that are considered a tasty lunch by certain predators.
There's a famous experiment with pigeons that illustrates that. The pigeons got food on random moments through some mechanism. After a while, the pigeons started identifying false patterns on how to trigger the mechanism, leading to quite absurd behaviour. This was the pigeon equivalence of human superstition.