Why does belonging to multiple groups boost self-esteem more than having lots of friends?

Social psychologist Jolanda Jetten answers

Of course, friends provide us with social support, emotional support, companionship, and other things that are important to feel good about ourselves.
However, membership in social groups provides us not only with the psychological resources that friendship offers, but also with many additional and unique psychological resources. For example, among other things, we can bask in the reflected glory of groups that succeed (e.g., when our sports team wins a game), and this can help us feel good about ourselves. At the same time, groups provide a powerful lens through which to see the world and make sense of it, and by this means they provide us with a sense of purpose, meaning, and direction. In that sense, group membership provides grounding, anchoring or—in Durkheim’s words—“existential security,” and this makes us stronger as individuals, thereby boosting our self-esteem.
In short, because groups provide us not only with a personal identity but also with a social identity that helps us to navigate, control, and understand our social world, they strengthen our sense of self in ways that tend to make us feel good about who we are and what we are doing.
Moreover, if one accepts that social group membership provides people with more, and richer, psychological resources than friendship, it follows that belonging to more social groups should helps us to become stronger as individuals and thereby boost our self-esteem more than having more friends.  

Jolanda Jetten is a professor of social psychology and an ARC Future Fellow at the University of Queensland in Australia.