I’d argue that especially people in bad situations, eg. being poor, in war or that have chronic illnesses, try to believe in something that helps them as a placebo. That just means religion is a consequence of being miserable or brainwashed though, not that the religion (including atheism) changes anything really.