I agree with this. Church communities also tend to be geographically local, which can be important.
As an Atheist, I have no desire to encourage people back to religion, but I do think society needs a replacement for the community created by religious groups.
I see a reinforcement of a group identity that can follow to new churches, often simply requiring attendance... opportunities to practice values through volunteering... the holy leaders' quasi-authoritative councilor/networking facilitator/self-improvement/social policing role... and more...
Hut how would we fulfill religion's roles without the leaps of faith and dogma that defines religion?
Religious families are big on family and I this day and age, they're smaller than ever. Gone are the days, in my case, of communing for a large family dinner almost every week. I barely even see my parents.
All of which to say I think our social needs were met in large part by family, and Church was a convenient vehicle to bring it together. There's no substitute for family. However, between a plethora of possible social obligations given our leisure time, I think loneliness can be abated.
In my experience churches and families are not independent things. Basically every healthy church spends a significant amount of time encouraging healthy families in both direct and indirect ways.
And most healthy churches aren't all that convenient. There are too many people involved for church to be convenient.
I'd say they're totally independent even if you perceive they may benefit families; lots of institutions can.
This kind of thing is actually more common in more conservative churches in my experience. More progressive groups don't focus on evangelism/conversion as much.
Religion is just an excuse, anything you can extract moral from is ripe from being abused as a justification for the worst human behavior.
We used communism and eugenism for the same purpose. We had a book, we had a leader, and we had a genocide.
The problem with modern substitutes seems to be that they are extremely narrow and probably very temporal (Keto diet fanatics, cross-fit buffs, even gay bars seem to be past their glory days). Much of the unity of the church body comes from a connection to ancestors and a sense that one is, cultural differences aside, a part of the same thing.