Daniel Dennett has talked about precisely this.
https://www.youtube.com/watch?v=m5tGpMcFF7U
In particular, the major world religions are particularly good at creating community and support groups. In part, it's because the major world religions have an ideological emphasis on love and compassion. While this often fails when dealing with out-groups, it succeeds in making true communities where people feel emotionally safe.
I say this as an Atheist: as a group, Atheists do many things that are the opposite of what religious communities do. In my experience, I am far more likely to be thrown under the bus in a group of people who announce themselves to be Atheists than, say, at some kind of a Unitarian or Episcopalian meeting. To go by my personal experience and the output of various YouTubers concerning the dramas and dissolution of various Atheist groups, it seems like Atheists spend a lot of time attacking each other and out-groups. In fact, this seems to apply almost universally to any kind of 21st century movement that spreads online and somehow involves politics. Outrage sells easily and goes viral easily. As a result, many 21st century movements, while professing the opposite, have a strong dependence on in-group/out-group hate.