There's a neurological argument that overgeneralizing cause from effect has survival benefits. There will be a high false alarm rate for tigers in moving grass, but that's a win if, sometimes, there really is a tiger. This leads to a tendency to assign causes for random events. That in turn leads to various belief systems not justified by the evidence.
Wikipedia has some notes in this area.[1]
[1] https://en.wikipedia.org/wiki/Neuroscience_of_religion