I'll keep this short, because I am both lazy and
in any case:
(1) Intelligence is pattern recognition mainly, it just is, don't make me quote stuff please. IQ tests and stuff use it. There done, lets move on.
(2) Pattern recognition is evolutionarily benefical. E.g: look henry just got bitten by a snake, look henry is dead. Snake bite bad, I'm going to avoid snakes...
(3) Recognising patterns that are not there is less evolutionarily damaging than ignoring patterns that are there, so evolution has spawned human kind with over active pattern recognition systems. (example thinking there is a pattern/association between dancing and getting rain doesn't hurt anything, but missing the pattern that the berries in the bush were poisonous and killed henry jnr is very damaging).
(4) Seeing patterns where there are none is the core of superstitious behaviour. For example Skinner's birds experiment demonstrated that regular feeding intervals of birds resulted in incorrect pattern recognition. Birds started pecking at the bottom of their cages, or jumping from corner to corner or twirling in circles. Why? Because the food just happened to be given when they were displaying the behaviour and the pattern was recognised but the causal link was false. Prayer, etc... works the same way.
So the big question, why is there religion? How does evolution allow for it?
Because people are intelligent... but still wrong a lot of the time.
in any case:
(1) Intelligence is pattern recognition mainly, it just is, don't make me quote stuff please. IQ tests and stuff use it. There done, lets move on.
(2) Pattern recognition is evolutionarily benefical. E.g: look henry just got bitten by a snake, look henry is dead. Snake bite bad, I'm going to avoid snakes...
(3) Recognising patterns that are not there is less evolutionarily damaging than ignoring patterns that are there, so evolution has spawned human kind with over active pattern recognition systems. (example thinking there is a pattern/association between dancing and getting rain doesn't hurt anything, but missing the pattern that the berries in the bush were poisonous and killed henry jnr is very damaging).
(4) Seeing patterns where there are none is the core of superstitious behaviour. For example Skinner's birds experiment demonstrated that regular feeding intervals of birds resulted in incorrect pattern recognition. Birds started pecking at the bottom of their cages, or jumping from corner to corner or twirling in circles. Why? Because the food just happened to be given when they were displaying the behaviour and the pattern was recognised but the causal link was false. Prayer, etc... works the same way.
So the big question, why is there religion? How does evolution allow for it?
Because people are intelligent... but still wrong a lot of the time.