What you don't seem to grasp is that atheism is not genetic. It's not something you pass on to your children through their genes. It is a concept and philosophical position, and even if you killed every single atheist alive you'd still have people born in the future who simply aren't convinced that gods exist. Those would be called atheists.
While you're right that religious philosophical positions (or non-religious positions) aren't inherited genes, there certainly is some data out there that would suggest that childhood indoctrination plays a huge role in the religious (or non-religious) choice an individual settles on in there adulthood.
A study was done a UMich (and I'll see if I can find a link and post it...I know I've posted it in a few threads in the past) that determined that roughly 88% of people (across the board), in their adulthood, end up in the religious institution their parents raised them in.
(and again, if I can find the study, I'll post it because they contain some more granular information at a religion & denomination level)
.............................................
...and it's pretty simple to understand why that's the case and why religion seems to be largely compartmentalized by location when you look at the entire globe.
While it's true that religion isn't an inherited gene, but a philosophical position, it's a position that's not nearly as open to the concepts of free choice and exploration/experimentation like picking one's favorite color, food, or type of car.
Parents often want to raise children in their own religion, and many aren't too receptive to the idea of their child embracing a religion other than their own. Try to imagine a 6 year old kid in a strict southern baptist home telling his parents that "I don't think I believe in Jesus, I want to worship Vishnu and become Hindu"...do you think that would be met with open arms?...or would the (more likely) outcome be some form of punishment or doubling down on the indoctrination?
By the time most people are in a position to freely choose their own religious preference, their formative years have all but passed and they've already been fully indoctrinated so it's not surprising that so few "stray from the flock" so to speak.