Here is an answer to that question that I found interesting. It is from Pascal Boyer, Religion Explained: The Evolutionary Origins of Religious Thought, pp. 3-4:
Does this mean religion is “innate” and “in the genes”?
I—and most people interested in the evolution of the human mind—think that the question is in fact meaningless and that it is important to understand why.
Consider other examples of human capacities. All human beings can catch colds and remember different melodies. We can catch colds because we have respiratory organs and these provide a hospitable site for all sorts of pathogens, including those of the common cold. We can remember tunes because a part of our brain can easily store a series of sounds with their relative pitch and duration. There are no common colds in our genes and no melodies either. What is in the genes is a tremendously complex set of chemical recipes for the building of normal organisms with respiratory organs and a complex set of connections between brain areas. Normal genes in a normal milieu will give you a pair of lungs and an organized auditory cortex, and with these the dispositions to acquire both colds and tunes. Obviously, if we were all brought up in a sterile and nonmusical environment, we would catch neither. We would still have the disposition to catch them but no opportunity to do so.
Having a normal human brain does not imply that you have religion. All it implies is that you can acquire it, which is very different.
The reason why psychologists and anthropologists are so concerned with acquisition and transmission is that evolution by natural selection gave us a particular kind of mind so that only particular kinds of religious notions can be acquired. Not all possible concepts are equally good. The ones we acquire easily are the ones we find widespread the world over; indeed, that is why we find them widespread the world over. It has been said of poetry that it gives to airy nothing a local habitation and a name. This description is even more aptly applied to the supernatural imagination. But, as we will see, not all kinds of “airy nothing” will find a local habitation in the minds of people. (Formatting mine)