Two years ago, I drove eight hours south from Toronto with two friends to participate in the Women’s March on Washington DC. That night we hand-lettered our posters (“This pussy grabs back!”) and stitched up the final seams of our pink knitted hats. In the morning, as we descended an escalator to a subway platform awash in pink, we soon realised the march was way too big – 500,000 people – to take its planned route along the National Mall. It was too big to march at all; instead, for seven hours, we stood packed in, shoulder to shoulder, chanting and cheering and straining to hear the speeches from the stage.

In some respects, it was the most exciting day of my life. Borne along by the crowd, I felt incredibly powerful; I felt my voice mattered, that my concerns were recognised and shared and my actions were making a difference in the world. I felt lucky to be part of something so massive and important. I was wholly present in the moment: This is the future and I’m helping to make it happen!

At the same time, being hemmed in by thousands of bodies made me anxious. It took a lot of energy to maintain my few centimetres of personal space. Keeping friends’ hands in a death-grip while inching through the mob, smiling continuously at strangers for mutual reassurance – and at one point, nervously scanning the rooftops for rumoured snipers. The tension between individual and group needs was impossible for me to ignore and led to a bone-deep exhaustion that, back home in Toronto, dogged me for a more than a week.

As a society we are intensely attracted to in-groups, the formal or informal organisation of people who have common identities, values or goals. Even if we don’t personally seek membership of these groups, we eagerly follow stories, both fictional and factual, about cliques, clubs and cults; think Netflix’s Wild Wild Country, HBO’s The Path, novels such as Emma Cline’s The Girls and Fred D’Aguiar’s Children of Paradise, and even well-read exposés of groups such as NXIVM, OneTaste and Children of God. The more secretive and arcane the rites of initiation and membership, the greater our fascination.

Why is it that when we gain admittance to one group, we seem intent on closing its doors to others?

Social change movements aren’t quite the same as secret societies, of course, but we are routinely confronted with the tendency of organised collectivities, even politically progressive ones, to become more exclusive over time. When the founding organisers of the Women’s March were accused of antisemitism, conflicts began to arise between the national and local organisers. Environmental groups Audubon and the Sierra Club have been divided by anti-immigration sentiments. In such cases, what have begun as open-armed communities begin to look more and more like armed camps.

Why is it that when we gain admittance to one group, we seem intent on closing its doors to others? In 1921, on the heels of global suffrage and workers’ rights movements but before the rise of Nazism, Sigmund Freud published his groundbreaking study of group psychology, in which he asserted that groups possess a “mind”, different from the individual minds of its members. Allowing this group mind to stand in for one’s own involves a huge compromise: we get a powerful emotional connection to a common ideal or leader; in return, we give up our self-consciousness, our personal authority and status, and our privacy. Freud would account for my euphoria at the Women’s March by explaining that intense pleasure comes with surrendering to group passions and the throwing off of private inhibitions. Group membership, for Freud, is comparable to the experience of hypnosis, or extreme cases of being in love, in which the rational mind falls under the sway of an idealised “other” and becomes uncritical, impulsive, wide open to suggestion.

A still from the Netflix documentary Wild Wild Country, about the Indian guru Bhagwan Shree Rajneesh and his followers at Rajneeshpuram in Oregon. Photograph: Netflix

While this state of mind can lead to irresponsible behaviour (football hooliganism, bullying), it can also have positive effects: in self-sacrifice and creative ferment. In my novel The Red Word, about a campus rape case, my narrator Karen registers the shift – not just intellectually but physically, too – moving from solo to group existence while helping to erect a Wall of Shame that catalogues the misogynistic acts of male students: “A small, shared exhalation went around the circle of girls gathered … We locked eyes with each other, one by one … There was surf-sound inside my ears, sudden sweat-sting in my armpits.”

No matter our politics, giving up our individuality to group interests comes at a steep psychological cost. Even when we long to be part of a group, we resent the overthrow of our personal sovereignty, which we end up projecting – both externally against outsiders, and in policing, censoring and shunning fellow members. The psychological violence that circulates within the collective bonds of a group has to be directed at a “proper” enemy to avoid implosion. Churches need bloody inquisitions, militias need wars, football fans need an opposition and high-school cliques need others to trash-talk. Otherwise, collective feeling can turn on a dime from selfless devotion to devouring hatred. Hazing, bullying, torture, riots, mass suicides are the horrible costs of group psychology gone wrong.

What would Freud make of group minds in the digital age? I don’t think he’d be surprised by the witch hunts, call-outs, draggings, and pile-ons. On the other hand, social media allow for the creation of micro-communities and the fostering of niche interests. Digital affiliations may discourage collective action, insofar as online discourse can substitute for “live” interaction, or they may send more of us into the street – like my Canadian friends and I, stirred into action by the online calls to march on Washington. Social media may alter the way we join and negotiate our group memberships, but it’s unlikely to change our fundamental need to be part of something larger than ourselves. Humans are social animals by nature and by evolution; we thrive by working together. This will always be something of a paradox to an introvert like me, whose idea of a party is a locked door and a good book. And yet, having tasted the strange pleasures of the mob, I’m certain I could be lured out from my behind my own barricades again. For a good cause, of course.

• Sarah Henstra’s novel The Red Word is available now (Tramp Press).