Spanish "artist" cleans a temple while drunk

I have seen an argument that from an evolutionary standpoint, in earlier times it may have conferred an actual survival advantage to those who irrationally believed in “something” (whatever that may have been) that would allow them to survive even when rationally there was no hope. The brain that rationally realizes that there is no hope and gives up (when facing, for example, a life-and-death battle against a sabre-tooth tiger) might be less likely to survive than the brain that tends to believe, no matter how impossible the odds and how severe one’s situation, that “something” will somehow come to the rescue and allow you to pull through. So, in line with evolution, those brains that were wired to just give up tended to die out in favor of those other brains that were wired to keep trying, and “faith” might have been a component of that brain wiring, which was then passed on to future generations, and which may remain in the wiring of the brains of modern man. In other words, I guess religion could be viewed as a further development of the evolutionary survival instinct of irrational optimism.

I’m not trying to make a value judgment here, but merely conveying one possible aspect – but certainly not the only aspect – of why religions form and take hold.