When I noticed this I started to think about all of the other ways in which both Christians and other religions attribute their misfortunes to supernatural intervention. A great many psychological illnesses and syndromes, for example, are thought to be the work of demonic possession.
In many cultures diseases are thought be caused by demons, the deaths of livestock or crops is thought to be the work of witchs, and there is even a superstition (still fairly common today in some parts of Africa) that a man's penis will can be stolen by a sorcerer and hidden away somewhere.
This got me to wondering why the belief in these agencies of supernatural evil was so widespread and universal. After awhile I realized that it was part of the same mechanism which brings about belief in gods.
When we are young children we often have difficulty telling the difference between animate and inanimate objects, especially when they pose obstacles to us. The chair which falls on us or the door which slams on our fingers is doing so deliberately, we think.
As we grow older this idea fades away and we realize that these things have no will of their own, but we also internalize the idea that things do not just occur on their own: they must have some kind of motive force.
Thus, we have the tendency to attribute things to an invisible force when we do not know what caused them to occur. Good things to God (or gods), bad things to demons. If early man didn't know about disease contagion or weather patterns, these very dangerous events would seem like deliberate attacks upon him, which in turn would lead to rituals designed to avert these disasters, a well known facet of religious experience.
The largest problem with this occurs when the demon explanation is retained even at the expense of a more logical explanation (such as disease being caused by bacteria) is presented.