system
A chat on subreddit /r/NoStupidQuestions
human
1. People want answers to lifes questions and religion can provide them, even if the answers may not be correct.
2. People like community and religion can provide that.
3. Peer pressure, if you're raised as X and everyone around is X, you're probably also gonna be X, at least publically.  Because what else are you going to do?
4. Religion and Government have been heavily intertwined since forever. In some nations, the Head of state and the head of the church are the same person, or the King represents god/the gods, or the nation is god's favorite(notably in the USA this is a thing). Sometimes the leader is descended from the gods(Japan used to be this way, A lot of ancient societies the leadership claimed divine heritage), because it's easier to exert power when revolt against the government is the same as revolt against the divine.
5. Governments traditionally don't have much patience for religions (or even parts of the same religion) they don't like or subscribe to. Europe in Particular had a period where being catholic in a protestant nation or protestant in a catholic nation wasn't particular fun or pleasent, god forbid you were jewish, muslim, etc. Catholics were discriminated against in the US for quite a while(people legit believed JFK was gonna work for the pope because he was catholic and president). Along the same lines, being publically atheist was essentially the same as saying you were a heretic or worse, so if you were, you kept it to yourself.
6. Even in countries like the US, being publically atheist is still looked down upon in a lot of places, notably parts of the South and there's language in certain state constitutions barring atheists from serving in government. So again, an atheist would probably keep their mouth shut and mouth the proper religious words to avoid harassment.
gpt
My whole family (cousins, aunts, uncles on fathers side)  wrote me off because I rejected confirmation and claimed athiesm.

I wanted to reject communion but I was too young to fight it.

I was an atheist since I was like 8, when it occurred to me that some people actually believed this shit.  I always thought the bible was like an off brand aesops fables, the idea that it was real never fit in my head.