As Fraggle touched on, I believe the predisposition to believe in the mythology common to your tribe is adaptive; it helped with the social cohesion necessary for groups of humans to survive in hostile environments. Humans most deadly enemies have usually been other groups of humans, and the tribe that stuck together survived.
It's been suggested that the supernaturalist instinct may indeed have been an asset to humans in the late Paleolithic Era. The population had reached a level that there was competition between tribes for resources, and deadly violence was common. (One report I saw of a study of late Paleolithic bones using modern instruments indicated that more than half of adult human deaths were due to violence.)
If the technology of language were developed around this time (and we have absolutely no idea when it was developed, except to say that it is at least 10,000 years old, which puts it precisely at the Paleolithic/Neolithic cusp), members of competing tribes might have been struck by the discovery that they believed in the same gods and legends. (Pre-Abrahamic religions were polytheistic and Jung tells us that they all had the same basic pantheon of 23 gods and goddesses, a very rich and stable collection of archetypes.) This could have inspired them to cooperate.
The invention of the technologies of farming and animal husbandry--agriculture in combination--was right around the corner. Agriculture requires people to gather in somewhat larger groups than the extended families of a few dozen adults and children that comprised the average hunter-gatherer tribe. Tribes that could cast aside their suspicions and cooperate because of a shared mythology could have facilitated the Neolithic Revolution: the permanent settlements, division of labor, surplus productivity and social organization among people who had not known each other intimately since birth, which put us on the path to civilization.
Unfortunately religion eventually reached its limit as a facilitator of civilization and now acts as a brake. Religions grew beyond their archetypes and their accretions became codified. As they grew apart, rather than reinforcing one population's similarity and kinship to its neighbor, they reinforced their differences, stalling humanity in a standoff of tribalism.
Heathen is not a good word, it literately means non Christan
* * * * NOTE FROM THE LINGUISTICS MODERATOR * * * *
"Heathen" means "non-Abrahamist": anyone who is not Jewish, Christian or Muslim.
The idea of God drives the race of humanity towards order and function to replace the chaos that would otherwise consume this world if there were not a set of laws and law codes to rule man. Therefore the Law of Moses was instituted. The belief in a god is not control (as Christians, we have free will), but one could have a much better ruled life, if the belief in God is in your records.
This is something that might have seemed true ten thousand years ago when our tribes first learned to live together in peace and grow their own food. However today, as I noted above, religion has become a divisive force and is a motivator of strife and violence, i.e.,
an engine of chaos.
Of course I am speaking specifically of the Abrahamic religions. Their built-in superiority complexes inspire entire sects to rise up in war against each other every few generations. Jung said, "The wars among the Christian nations have been the bloodiest in human history." He overlooked Genghis Khan, but with that one exception he was right. He also didn't live long enough to see the spectre of a three-way nuclear war among Christians, Jews and Muslims.
My analysis, and one that a couple of Jungians agree with, is that since religion, as a collection of instinctive archetypes, is a model of our own unconscious or "spirit," the polytheistic model is a rich multi-dimensional representation of our spirit, and helps us understand ourselves. Whereas monotheism is a one-dimensional model, which attempts to squeeze all of that richness onto a pathetic linear scale where everything falls somewhere on a line between "good" and "evil."
Much of our nature simply can't logically fit onto the "good" end of that scale, so we submerge it into our unconscious and try to deny it, where it festers in what Jung calls the "shadow" until one day it erupts into truly "evil" behavior.
Abrahamic culture has an uncanny way of synchronizing the submerging and festering of entire communities, so their evil behavior erupts in coordination, overwhelming the secular institutions that normally keep order by ostracizing, locking up or simply executing evildoers. Thus we have Holy Wars.
Civilization is stalled right now, with the three sects of Abrahamism prepared to erupt into one of these periodic cycles of violence
all at once, and this time with nuclear weapons.
Religion is indeed an engine of chaos.