I believe is a combination of things, it is in part in our biology, and our nurturing, more often that not, you will be borne into it. (Never underestimate family and peer pressure.)
It is only when (and if) one finds out that many belief positions (i.e. hell) do not make sense, that one begins to lose religion. On this, no two people are alike, and some people will never get it.
As long as they are not busy making laws that insidiously press religion into infidels, or discriminate against non-believers, I prefer to let them find the truth for themselves. Discussing scripture is essentially useless, since we end up going in circles. instead, info that shows how wrong scripture is, or that interpretations of it are dead wrong; eventually do change intelligent people for the better.
Like, for example: finding recently that the whole Onan interpretation of masturbation=bad has been proven to be evil in itself. Recently, it was found that male masturbation reduces the probability of prostate cancer, who knew! Well somebody knew! If we take the religious point of view, problem is, it took us until the 21st century to find that out. I could go then go crazy assuming god did not bother to tell their disciples that that interpretation was wrong, and he ended up causing unnecessary pain. Or, I could just conclude those interpretations were wrong, and that church x that promoted that view is wrong.
And that, BTW, is only one small step to find the truth, and we unbelievers should not feel disappointed or lose respect if intelligent people do not see it that way; that is ok, as I see myself, losing religion is not a binary proposition. Humans that we are, we will still remain open to possibilities, that is why I am a hard agnostic.