A few people a long time ago made some separate but nonsensical claims, the effect of logical fallacies, inappropriate critical thinking, perceptive errors, etc. These are then told to their children at that vulnerable age at which they believe all that they are told, like:
Digging a canal from a river to our fields is essential.
If u don’t sacrifice a goat the sun wont rise.
U should not steal from others and u should respect all elders.
U should aim the arrow higher when hunting to compensate for gravity.
The child has no idea that statement no 2 is crap. And If there's a eclipse when he was in a heretic mood, the belief will be so strong nothing can shake it. He will then, with even more conviction, relate the same thing to his child, the eclipse episode no added to the myth. We have an early beginning of a religion.
What makes the situation worse is that religion, once formed is remarkable able to handle all aspects of opposition. One is reminded of Dawkin's idea of Memetic evolution of culture. In religion, faith or blind acceptance of god is considered a virtue. Even if some evidence is presented, its horribly biased and twisted. The spread of faith or evangelism is considered a great thing to do. Plus, belonging to the faith has claimed advantages like loss of fear of death, beautiful eternal fun, a personal superman helper, etc. On the other hand, loss of faith is forbidden and claimed punishable by lovely things like eternal suffering, burning, pain and a charming companion called the devil [or some version thereof].
Add to this the fact that religions have these amazing social events like mass, congregations, ceremonies, etc which provide social bonding, fun and a sense of security and a smug pride in being the 'ones' and one can see how easily religion can maintain its grip even in the face of reason and rationality and the wonders of modern science.
And so the vicious cycle continues, parents tell their children what their parents told them and the children do the same with their own offspring. Money hungry institutions and power thirsty people also help continue the circle of indoctrination. Poor babies, threatened with eternal fire and asked to give up [or twist or make exceptions in] the reasoning capablities they havent even delevoped yet.