Noting the great similarity of magical thinking in all types of human societies and eras of recorded history, some cognitive scientists suggest that these ways of thinking are intrinsic to humanity. Many articles in neuroscience have shown that the human brain excels at pattern matching, but that humans do not have a good filter for distinguishing between perceived patterns and actual patterns. Thus, people often are led to see "relationships" between actions that don't actually exist, creating a magical belief.
There is much current scientific research in cognitive science that supports this view.
For example, people tend to seek confirmation of their hypotheses, rather than seeking refutation as in the scientific method. This is another example of confirmation bias. People are also reluctant to change their beliefs, even when presented with evidence, and often prefer to believe contradictory things rather than change pre-existing beliefs. This phenomenon is known as cognitive dissonance.
http://en.wikipedia.org/wiki/Magical_thinking