“Patternicity” is a term coined by Michael Shermer (editor of Skeptic Magazine) to explain our innate pattern-seeking nature. He argues that evolution has primed our brains to see patterns where none exist. In the paper “The Evolution of Superstitious and Superstition-like Behaviour” in the Proceedings of the Royal Society B, Harvard University biologist Kevin R. Foster and University of Helsinki biologist Hanna Kokko tested his theory through complex evolutionary modeling. They concluded:
“The inability of individuals—human or otherwise—to assign causal probabilities to all sets of events that occur around them will often force them to lump causal associations with non-causal ones. From here, the evolutionary rationale for superstition is clear: natural selection will favour strategies that make many incorrect causal associations in order to establish those that are essential for survival and reproduction.”
For example, if our ancient ancestor heard a rustling in a nearby bush, it was always safer to assume it was a dangerous predator, rather than to believe it was anything more benign. Simply put, sometimes it’s advantageous to perceive things that aren’t there.
Superstition in Animals
As previously mentioned, patternicity is not unique to humans, and neither is superstition. In a now famous experiment, renowned Behavioral Psychologist B.F. Skinner was able to elicit behaviors in pigeons akin to those performed by humans in religious rituals. In many of Skinner’s other experiments, he would attempt to train animals to perform various behaviors by giving them food as a reward whenever they performed the behaviors correctly. In this experiment, he had no specific behaviors to teach the pigeons. Instead, he simply gave them food at regular (e.g. 15 second) time intervals. The effect: the pigeons tended to repeat whatever they recall themselves doing before the last time they were given food. They would nod their head, flap their wings, turn counterclockwise, and perform other actions over and over again until they were fed again. As Skinner put it:
“The experiment might be said to demonstrate a sort of superstition. The bird behaves as if there were a causal relation between its behavior and the presentation of food, although such a relation is lacking. There are many analogies in human behavior. Rituals for changing one’s luck at cards are good examples. A few accidental connections between a ritual and favorable consequences suffice to set up and maintain the behavior in spite of many unreinforced instances.” 
Is this so different from believing that every time you pray, something good happens? To me, the only major difference is that, in humans, these sort of “accidental connections” lead to very complex systems of belief reinforced and adapted through years of cultural evolution.
The Evolution of Persistent Beliefs
So, let’s say that at one point, a long time ago, ancestors of modern humans really needed it to rain so that their crops would grow. Given that they believed the rain was controlled by some sort of invisible human-like agent, they figured they would need to appease this agent in order for him to turn on the faucet. They decided to dance for this agent and, to ensure there’s no miscommunication, chant “please make it rain” over and over again. After several attempts, it rained. Thousands of years later, human descendents of these people still dance to make it rain.
Now, let’s say a visiting trader from a faraway land noticed these dances usually didn’t lead to rain. He decided to document the success rate, and shared the negative results with the local populace. Despite the evidence, no one would be convinced that rain dancing didn’t work. Why? Well, one evolutionary explanation is that of Cultural Cognition. Recall from my last post that humans evolved to possess pro-group behaviors. One of these behaviors is the tendency to view the world through the lens of one’s culture, and to see all challenges to the beliefs of one’s culture as a threat. Thus, as an innate response to these threats, people entrench their minds against even the most rational of ideas or definitive evidence. In evolutionary terms, this show of solidarity strengthens the group, and thus the likelihood that its members will survive to pass on their genes. In the modern context, this leads to climate change deniers, creationism, faith healing fatalities, and other unfortunate behaviors and beliefs.
Like other animals, humans are prone to perceiving patterns that do not exist, and we alter our behaviors in quite strange and irrational ways due to our beliefs in the imaginary. For pigeons, this tendency may lead to bobbing heads and flapping wings. For humans, our beliefs become solidified by our innate desire to conform to our peer groups. Unfortunately, this leads many to stay silent when rational voices are most needed: when human lives are at stake.
Michael Shermer on Patternicity:
Great Article on Cognitive Dissonance and Cultural Cognition
Andy Thomson Discusses Ideas from his Book “Why we believe in god(s)”
TIME Article on “The Evolution of Faith”