This is exactly it. That's a big part of regular religious gatherings too. When you frequent a temple, mosque, or church every week. You're bound to make friends. We just haven't found a good replacement for that yet.
Volunteering is a good alternative. My partner and I volunteered for years at a place (only disrupted because of COVID) and we made some great friends there.