Selfish traits such as envy have a bad reputation. They are, after all, ‘deadly sins’, ‘impurities of the heart’ and, according to the Summa Theologica (c1265-1273) of Thomas Aquinas, their ‘object is contrary to charity, whence the soul derives its spiritual life’. And it is not just Catholicism that has it in for them. All major religions decree that a special kind of damnation awaits those in thrall to the green-eyed monster.

Yet, as socially corrosive as it might appear, there is an awful lot of envy about. Social media is saturated in it. So much so that it has spawned a flourishing new line of business for therapists, as well as a range of new diagnostic terms such as ‘Facebook envy’.

Reflecting its amplification in social media, envy has now moved from the shadows of the corridors of power to centre stage. But beyond headline-grabbing squabbles about inauguration turnouts and sniping on social media, envy plays a far more profound role in shaping our choices and actions than most of us would care to admit. This is not just because it often masquerades as ambition. Nor is it because so many of us now conflate self-worth with impossible expectations.

Rather, it is because envy served an important, if surprising, evolutionary purpose, one that helps us to reconcile this most selfish of traits with the sociability that was so critical to the extraordinary success of our species. If the behaviour of 20th-century hunter-gather societies is anything to go by, over and above its obvious selective benefits for individuals, envy formed part of the cocktail of traits that ultimately assisted Homo sapiens to form and maintain strong social groups.

Nyae-Nyae in Namibia’s Kalahari Desert is a synonym for remoteness in a country where everything is remote. It is also home to the Ju/’hoansi ‘Bushmen’, the best-documented hunting and gathering community on the planet. But no one in Nyae-Nyae depends exclusively on hunting and gathering any more. A half-century of land dispossession, well-meaning if ineffective economic development programmes and a decade of military occupation make it no longer possible for the Ju/’hoansi to live as their ancestors did.

But research conducted among the Ju/’hoansi in the 1950s and ’60s when they could still hunt and gather freely turned established views of social evolution on their head. Up until then, it was widely believed that hunter-gatherers endured a near-constant battle against starvation, and that it was only with the advent of agriculture that we began to free ourselves from the capricious tyranny of nature. When in 1964 a young Canadian anthropologist, Richard Borshay Lee, conducted a series of simple economic input/output analyses of the Ju/’hoansi as they went about their daily lives, he revealed that not only did they make a good living from hunting and gathering, but that they were also well-nourished and content. Most remarkably, his research revealed that the Ju/’hoansi managed this on the basis of little more than 15 hours’ work per week. On the strength of this finding, the anthropologist Marshall Sahlins in Stone Age Economics (1972) renamed hunter-gatherers ‘the original affluent society’.

If a society is judged by its endurance, then this was the most successful society in human history

This research also revealed that the Ju/’hoansi were able to make a good living from a sparse environment because they cared little for private property and, above all, were ‘fiercely egalitarian’, as Lee put it. It showed that the Ju/’hoansi had no formalised leadership institutions, no formal hierarchies; men and women enjoyed equal decision-making powers; children played largely noncompetitive games in mixed age groups; and the elderly, while treated with great affection, were not afforded any special status or privileges. This research also demonstrated how the Ju/’hoansi’s ‘fierce egalitarianism’ underwrote their affluence. For it was their egalitarianism that ensured that no-one bothered accumulating wealth and simultaneously enabled limited resources to flow organically through communities, helping to ensure that even in times of episodic scarcity everyone got more or less enough.

There is no question that this dynamic was very effective. If a society is judged by its endurance over time, then this was almost certainly the most successful society in human history – and by a considerable margin. New genomic analyses suggest that the Ju/’hoansi and their ancestors lived continuously in southern Africa from soon after modern H sapiens settled there, most likely around 200,000 years ago. Recent archaeological finds across southern Africa also indicate that key elements of the Ju/’hoansi’s material culture extend back at least 70,000 years and possibly long before. As importantly, genome mutation-rate analyses suggest that the broader population group from which the Ju/’hoansi descended, the Khoisan, were not only the largest population of H sapiens, but also did not suffer population declines to the same extent as other populations over the past 100,000 years.

Taken in tandem with the fact that other well-documented hunting and gathering societies, from the Mbendjele BaYaka of Congo to the Agta in the Philippines (whose most recent common ancestor with the Ju/’hoansi was around 150,000 years ago), were similarly egalitarian, this suggests that the Ju/’hoansi’s direct ancestors were almost certainly ‘fiercely egalitarian’ too.

Ju/’hoansi egalitarianism was not born of the ideological dogmatism that we associate with 20th-century Marxism or the starry-eyed idealism of New Age ‘communalism’. There was no manifesto of ‘primitive communism’. Rather, it was the organic outcome of interactions between people acting explicitly in their own self-interest in a highly individualistic society. This was because, among foraging Ju/’hoansi, self-interest was always policed by its shadow, envy – which, in turn, ensured that everyone always got a fair share, and that those with the natural charisma and authority to ‘lead’ exercised it with great circumspection. This was best exemplified in the customary ‘insulting’ of the hunter’s meat.

Skilled Ju/’hoansi hunters needed a thick skin. For while a particularly spectacular kill was always cause for celebration, the hunter responsible was insulted rather than flattered. Regardless of the size or condition of the carcass, those due a share of the meat would complain that the kill was trifling, that it was barely worth the effort of carrying it back to camp, or that there wouldn’t be enough meat to go round. For his part, the hunter was expected to be almost apologetic when he presented the carcass.

Of course, everyone knew the difference between a scrawny kill and a good one but continued to pass insults even while they were busy filling their bellies. Hunters rarely took the insults to heart, and those dishing them out often did so through broad grins. This was a performance in which everyone played well-rehearsed roles. But it was also a performance with a clear purpose, as beneath the light-hearted insults lay a sharp and potentially vicious edge.

More than any other food, meat was capable of making the Ju/’hoansi forget their customary good manners, so it required extra diligence in distribution. It also meant that there was a risk that particularly skilled and energetic hunters might begin to consider others to be in their debt, so fracturing the delicate egalitarian balance that sustained band (or small kin-group) life. The insults ensured that individual hunters took care not to be so successful that they stood out or, worse still, began to imagine themselves to be more important than others.

One Ju/’hoansi man gave Lee a particularly eloquent explanation of this, quoted in The Dobe Ju/’hoansi (1984):

When a young man kills much meat, he comes to think of himself as a chief or a big man, and he thinks of the rest of us as his servants or inferiors. We can’t accept this … So we always speak of his meat as worthless. This way we cool his heart and make him gentle.

This kind of teasing was not only confined to good hunters. It was meted out to anyone who boasted, got too big for his leather sandals or encountered a windfall of some sort. And anyone who was seen to be selfish, perhaps by hoarding tobacco or food, could expect a barrage of unfriendly insults.

They went to lengths to avoid being singled out for selfishness, which created a harmonious atmosphere

My enquiries into why the Ju/’hoansi were so quick to criticise, tease and mock always generated the kinds of answers that remind anthropologists that cultural norms are norms precisely because they are accepted rather than interrogated, and because they present themselves as natural and inevitable. Every time I asked, the mockery was ascribed simply to feelings of ‘envy’, just as the humility shown by good hunters and others with something to brag about was ascribed to ‘embarrassment’. ‘It is just how we are,’ I was told again and again.

Everyone jealously scrutinised everybody else all the time – something easy to do when all social life was conducted in a public space. They took careful note of what others ate, what others owned, what others received or gave as gifts, and whether or not they were sufficiently generous in return. And most of the time everyone went to some lengths to avoid being singled out for selfishness or self-importance. Unsurprisingly, this created an atmosphere that was harmonious and that was torn asunder only rarely when someone felt wronged.

Insults and mockery weren’t the only tool that hunter-gatherers had in their bags to maintain egalitarianism. Another that was explicitly linked to the expression of envy was ‘demand sharing’. Where we usually consider it rude for others to ask unashamedly for something that we own or to just expect to receive it, the Ju/’hoansi considered this normal. More so, as far as they were concerned, denying someone’s request ran the risk of being sanctioned for selfishness. Demand sharing did not lead to a free-for-all that ended up undermining any sense of private ownership. Instead, demands for things were usually – though not always – carefully considered. The net result of this was that, while private property was respected – after all, if there is no private property, how could you enjoy giving or receiving a gift? – material inequalities were quickly ironed out. However, the system was challenging for relatively well-resourced outsiders such as myself, which often resulted in a month’s supply of tobacco and food for a field trip being exhausted within a very short period of time.

With mockery and demand sharing as its most obvious manifestation, envy was the ‘invisible hand’ of the Ju/’hoansi social economy. Yet it exerted its influence very differently from the ‘invisible hand’ imagined by Adam Smith in The Wealth of Nations (1776). For Smith, man ‘intends only his own gain’ but in doing so he is guided by an invisible hand ‘to promote an end which was no part of his intention’. And this, according to Smith, is to ‘promote the interests of society’ more effectively than ‘man’ could, even if he had intended to. Smith believed that trade and enterprise in pursuit of personal enrichment and unburdened by regulatory interference ensured the fairest and most effective ‘distribution of the necessaries of life’ and so advanced ‘the interests of society’.

Even if Smith’s hidden hand is still solemnly invoked by some as gospel, there are few economists who will defend an inflexible interpretation of it now. Smith himself would almost certainly be among the first to acknowledge that the contemporary economic world with its convoluted financial derivatives and ever-inflating asset values is a very different creature to the ‘merchants and mongers’ he had in mind when he mused on the unintended benefits of self-interested commerce.

But, ironically, how envy functioned in societies such as the Ju/’hoansi suggests that, even if Smith’s hidden hand does not apply particularly well to late capitalism, his belief that the sum of individual self-interests can ensure the fairest distribution of the ‘necessaries of life’ was right, albeit in small-scale band societies. For hunter-gatherers, the sum of individual self-interest ultimately ensured the most equitable ‘distribution of the necessaries of life’ because it discouraged profitable exchange, hierarchy, wealth-accumulation and significant material inequality.

Envy squats quietly in the shadows of social life, reminding everyone of its presence when people argue

Highlighting the explicit role of envy in Ju/’hoansi life risks giving the impression of a society of reluctant egalitarians constantly sniping at one another – an impression that any Ju/’hoansi will tell you is a far cry from the cheerful banter and mutual affection that characterises day-to-day life. And while, to be sure, the Ju/’hoansi do not reward people for being egalitarian, they are conscious of the positive emotional and social dividends that sharing, cooperation and harmony bring. Among these are the profound feelings of belonging so eloquently described by Lorna Marshall in her classic ethnography The !Kung of Nyae-Nyae (1976). And even if anthropologists have tended to focus on the material benefits of egalitarianism for creating networks that assist people in material risk, there is a strong case that the emotional benefits of the affective bonds that tied people together both within and between bands was arguably a more important consideration.

Unsurprisingly, envy still accounts for most conflict among the Ju/’hoansi in contemporary Nyae-Nyae where inequality is greater than ever before, because some have jobs or access to resources such as pensions that are denied to others. Envy squats quietly in the shadows of social life, reminding everyone of its presence when people argue or fight. To confine jealousy to the shadows, the Ju/’hoansi still emphasise the importance of good manners, great humility and go to considerable lengths to avoid giving others cause to feel aggrieved.

As much as the Ju/’hoansi’s fierce egalitarianism served them and their ancestors well, it poses a challenge now. They are by far the poorest and most marginalised of Namibia’s many distinct ethnic communities. But they remain deeply uncomfortable in elevating any of their peers to leadership positions, and those who assume the mantle of leadership do so often reluctantly, in the knowledge that they will be closely scrutinised and sometimes viciously criticised. As a consequence, they remain desperately underrepresented in state institutions with the result that their interests are often overlooked and ignored. Similarly, with many Ju/’hoansi now dependent on the cash economy (mainly as cheap labour) with its attendant employment hierarchies and management systems, many Ju/’hoansi are reluctant to take management roles or assume responsibilities that require making and imposing their decisions or authority on others.

If envy played a constructive role in small-scale band societies such as the Ju/’hoansi, it is harder to establish whether it has a similarly beneficial purpose in more complex, hierarchical societies. What is certain is that the emotions invoked play a significant role in shaping our economic choices and political affiliations.

Even so, understanding envy’s cohesive role in band societies is analytically useful. It offers some insights into why this apparently corrosive vice has survived the mill of natural selection, and it reminds us that our sense of fairness almost certainly has a strong genetic component. Perhaps most importantly, it helps us to understand why inequality has proved time and time again to be a far more potent spur for political action than absolute poverty; why gaudy displays of wealth are capable of persuading nominally content middle classes to froth with rage, and why demagogues do so well when they position themselves as the enemies of ‘elites’ – both real and imagined.

A recurring theme in the ever-proliferating analyses of the febrile mood that has recently consumed established democracies in Europe and the United States is inequality. The trend towards increasing inequality – despite incrementally improving baseline living standards – has been the subject of major analyses by some of the luminaries of contemporary economics, from Thomas Piketty to Joseph Stiglitz.

But even if the gap between rich and poor (and more importantly, the super-rich and everyone else) had not expanded to the extent it has since the 1980s, inequality is now very much more in our faces than it used to be. We are confronted by a near-neverending stream of gold-plated ostentation in both broadcast and social media. And while this provides inspiration to some and cheerful gossip for others, it also generates the kind of resentments that, historically, inspired revolutions. And while the large-scale ‘communist’ experiment in egalitarianism was a failure, it is possible that technology might well provide an organic spur to creating the kind of envy-attuned self-awareness that sustained the fierce egalitarianism typical of hunter-gatherer societies, and that in turn ensured that they thrived for such an extraordinarily long period of time.