In primitive society the rules of ceremonial purity observed by divine kings, chiefs, and priests agree in… — James George Frazer
In primitive society the rules of ceremonial purity observed by divine kings, chiefs, and priests agree in many respects with the rules observed by homicides, mourners, women in childbed, girls at puberty, hunters and fishermen, and so on. To us these various classes of persons appear to differ totally in character and condition; some of them we should call holy, others we might pronounce unclean and polluted. But the savage makes no such moral distinction between them; the conceptions of holiness and pollution are not yet differentiated in his mind. To him the common feature of all these persons is that they are dangerous and in danger, and the danger in which they stand and to which they expose others is what we should call spiritual or ghostly, and therefore imaginary. The danger, however, is not less real because it is imaginary; imagination acts upon man as really does gravitation, and may kill him as certainly as a dose of prussic acid.
Source: Wikiquote · CC BY-SA 4.0
More from this book
The notion that we can transfer our guilt and sufferings to some other being who will bear them for us is familiar to the savage mind. It arises from a very obvious confusion between the physical and the mental, between the material and the immaterial.
Dwellers by the sea cannot fail to be impressed by the sight of its ceaseless ebb and flow, and are apt, on the principles of that rude philosophy of sympathy and resemblance...to trace a subtle relation, a secret harmony, between its tides and the life of man...The belief that most deaths happen at ebb tide is said to be held along the east coast of England from Northumberland to Kent.
With the advance of knowledge, therefore, prayer and sacrifice assume the leading place in religious ritual; and magic; which once ranked with them as a legitimate equal, is gradually relegated to the background and sinks to the level of a black art.

