Biologist Lewis Wolpert has a theory:
[O]nly human primates understand the causal and intentional relations that hold among external entities. Tomasello illustrates this point for non-human primates with the claim that even though they might watch the wind shaking a branch until its fruit falls, they would never shake the branch themselves to obtain the fruit. Some primates are, nevertheless, at the edge of having causal understanding. Once causal belief evolved in relation to tools and language, it was inevitable that people would want to understand the causes of all the events that might affect their lives such as illness, changes in climate and death itself. Once there was a concept of cause and effect, ignorance was no longer bliss, and this could have led to the development of religious beliefs.
(Hat tip: Vaughan)