It's the only logical reason, and I feel like to those who are on the verge of becoming atheist or agnostic, the knowledge that atheists statistically have fewer children can't be encouraging. I think those stats are a little unfair, however, as atheism arises in countries that have fully developed, and people in developed countries have significantly fewer kids. Still, it's not in your best genetic interest to not be religious, so regardless of whether it seems stupid and false, at least some people are probably motivated to stay religious for this reason.
Religion is an easy coping mechanism for a human being. When someone is oppressing you, it's easier to think of it as a test of faith rather than confront an overwhelming force that you are helpless to face. History easily shows that humans begin to question or criticize their faith when their environment/education improves.
But surely the environment they grow up in is decided in large part by genetics. Their personal circumstances can be linked to genetics. If someones reasoning for believing in a religion is out of what makes sense to them ... Or which doctrine seems more beneficial, which one makes them feel better as a person, etc. You could probably make the argument that what they feel there is somewhat inherent to their makeup. People do not tend to worship gods that dont reflect some world order that they already hold in their hearts. The reasons for feeling the order should be that way could largely be genetically dependent because the very environment you live in is ruled by people interacting with you differently based on factors decided by your genetic makeup. You relate to people better who hold your same conditions, you gain a sense of satisfaction and reassurance when you have those people to relate to. It fuels societal bonds ... Which in turn fuels religious bonds. People who have the same 'something' in a struggle against a common 'something else'.
However family/role models play a big role in it. Every single person I know that didn't grow up with religious parents are not religious. And nearly every person I know who grew up with religious parents ARE religious.
When the people who raise you push their beliefs on you and don't give you options, you tend to believe those things. Such as Santa Claus, most of the time you believe in him, and although your parents may not necessarily flat out say "just kidding, he doesn't exist," they slowly stop mentioning him, and you begin to realize he doesn't exist.
The difference with God/religion is that your parents continue to say God exists and religion is "true" or whatever, so they don't give you the option to choose for yourself or grow out of it.
This is not genetics, however it does have to do with who your parents/family are.
Beliefs aren't transferred through genetics. There is no concrete evidence to even suggest that a persons beliefs can be passed down via genetics. To imply that would mean that people would mostly have their lineages belief but there are many instances where people change their beliefs and mindset. It is very obvious that so many people are still religious due to upbrining, environment and the repetitive drilling of the religious doctrine from their childhood all the way up to adulthood.
Genetically, we are built to be pattern seeking. In that sense, as we develop, we try to explain things. When we can't explain it, we try to fill in the gaps with something that works. Hence why we have farmer's almanacs. There was no real science behind them back in the day, just an observance of how the seasons shifted, patterns that affected farmers, that grew into rules of thumb.
While, in that way, we could say that people fill in the blanks because we are genetically primed to do so, but this is not specific to being religious. Most people, unless they are indoctrinated into a faith, do not default to a faith based position. They default to what they see before them, what is presented to them.
It is only in the face of big unknowns that we propose a bigger unknown as explanation. Just look at how most look at medical science, now that we have explained so much about the human genome. Most people look at the evidence, and take that over spiritual explanations. Even small children, when presented with those ideas first, tend to err towards evidence.
No, it's not because of genetics. It's because of your parents beliefs. Studies have shown that children are much more likely to trust what they are told by the authority figures in life and that the things that they are inculcated with as children, they carry with them as adults.
Even if, as adults, they realize that what they were told was nonsensical, they will still struggle with changing their thought process. It has something to do with how our brains are formed as children. Which is why childhood trauma is so serious and can be debilitating in adult life.
So, the main reason people are religious is because it is something that has been passed down through generations.
People look toward religion in times of despair. When they need hope, they look toward someone or something to give them that hope. People in poverty-stricken countries might be more apt to be religious because they have no hope things will ever get better.
Economic stability can affect genes. People with little access to food, healthcare, and clean drinking water might be genetically different from those who have all of those things. Our lifestyle choices have an affect on our genes.
Genes might play a small role in a person's predisposition for belief in God (such as developing personality), but it is only one of many factors.
Until we map the entire human genome and determine which genes may or may not be "religion" genes, we'll never know. And by the time that we do accomplish such a big task, some of our genes will have probably mutated and changed, making our findings obsolete.
There are too many variables (economy, environment, parental influence, lifestyle choices) to prove a causal relationship between genes and religion.