If you grow up in a religious monoculture where pretty much everyone adheres to the same religion, and absolutely nobody publicly critiques that religion or states that their beliefs are different, then the odds that you’ll also belong to this religion are very high.
Most people do more or less what’s expected of them, after all.
But if you grow up with a wide variety of views being talked about openly and honestly, and with a multitude of role-models that have DIFFERENT beliefs, then it becomes forcibly clear to you that there is a choice here, that it’s not the case that one single “default” religion is the only one you are expected to follow.
And once you start to compare and contrast different beliefs, it is readily apparent that they’re all human-made, all equally unsupported by evidence, and all the products of the cultures that invented them, rather than divine intervention.
At that point, the way to atheism is very short.
It makes little sense, after all, to say that there are hundreds of more or less equivalent religions, all equally unsupported by evidence, and all with both splendid and horrible people among their supporters, and therefore you pick one of them at random and believe in it.
In practice, nearly all religious belief is an accident of birth: the vast majority of the world’s religious people simply believe in whatever religion was predominant in their upbringing, i.e. the one adhered to by their family and others around them.