Understanding why some people become atheist
Why do some people who are raised in a household in which religion is a vital part of daily life remain attached to their parents’ faith in later life, while others convert to another religion or abandon religion altogether? Some simply accept what they have been taught and stick with it. Some find the religious beliefs and practices of their childhood to be unsatisfactory in some way. They search for another religion that accords more closely with what they truly believe. Some change religions as a purely practical matter, joining a different group because of marriage to some member of that group or because of the advantages in terms of business connections. It sounds like a cynical process when it is done for those reasons, but lots of people do it.
Other people abandon religion altogether.
They either acknowledge that they are atheists or simply ignore religion and never think about it. Children are taught many things in the course of their religious education. No matter which specific religion they are taught, they will find later in life that some of what was put into their heads as children is just not true. Many continue to accept tales of miracles. Some recognize that events may not have taken place exactly the way they were told, but continue to accept the fundamentals of their religion.
When a person realizes that the statement that someone made the sun stand still is complete nonsense and not an account of some sort of miracle, the seeds of doubt have been planted. At the time that story was written it was thought that the sun went around our planet, so stopping its motion would be miraculous but meaningful. Now that we know Earth orbits the sun rather than the other way around the story that somebody made the sun stand still is meaningless.
Looking deeper into supposedly divinely-inspired and absolutely perfect texts will always find inconsistencies and contradictions. It can be the beginning of a process of questioning all religious tenets. A person may examine other religions and may adopt one or another at some time. But eventually, he or she realizes that all so-called divine writings are just compilations of something some old guy with a beard said a long time ago that was written down, usually many years later, by some other old guy with a beard. The process of opening ones eyes and mind to where religious teachings come from leads to a recognition that they are all hollow. There is no rational reason to believe any of them. The concept of religion has joined the “ether” that physicists knew existed—until their evidence was solid that it did not exist.
When religious become atheists
There is another, fairly common, way that heretofore religious people can turn away from all religions and become atheists. An unexpected and undeserved event that causes catastrophic results in their lives can make them give up on any concept of a benevolent deity. The question of why an all-powerful, omniscient deity would allow a child to waste away and die of cancer has never had a satisfactory answer. The story of Job is often cited to give some kind of explanation of undeserved misfortune and the need to remain faithful. It is a truly horrible story. That story in itself could be enough to drive a thinking person away from worship. The idea that a benevolent deity would allow a completely loyal follower to suffer all the horrors that were loaded on Job, and do it just to show that Job would keep his faith no matter what is horrifying. It tells us that God will play with our lives just on a whim—just because He wants to.