For some, it is more convenient to hang out with people with similar tastes in food, clothing, music, even the same set of values. There is less chance of conflict, less possibility of being shocked. You can feel you 'belong to' the group. And of course, there is ingroup favoritism and perks like free mentoring from your alumni association, or information about musical concerts of genres your share affinity towards.
A group can be of new parents, foodie, bloggers. I'll definitely appreciate a passably decent social event for marketers for startups right now. The categorical variables may vary, but the idea is the same. In some cases, it is essential to belong, to have conversations regarding your existing interests. But if we interact with people ONLY within our comfort zone, we will never learn new things or see the world from a different perspective. Scary.