Key topics:Xenophobic violence rooted in unemployment and economic failureIllegal migration driven by desperation, not criminal intentJob creation key to easing tensions and restoring stability.By Alec Hogg*.A few years ago, I bumped into an old friend at OR Tambo, both of us killing time before early-morning flights. He'd just returned from a week in Lagos. I expected the usual grimaces — the traffic, the chaos, the heat. Instead, his eyes lit up."Alec," he said, leaning forward, "those people are hungry. Not hungry for food. Hungry like nothing is going to stop them."He'd watched street traders in Lagos operating with a sophistication that would shame many a Sandton entrepreneur. Supply chains improvised from nothing. Customer service that put our malls to shame. Two cell phones standard issue. And an absolute, bone-deep refusal to accept that poverty was a permanent condition.I've thought about that conversation often. Most recently while watching images of the latest eruption of xenophobic violence rippling through South Africa's townships and informal settlements.The television images are grimly familiar by now. Burning shops. Looted shelves. Families with everything they own bundled into a sheet, fleeing into the night. Zimbabweans, Mozambicans, Malawians, Somalis, Ethiopians and Nigerians — the very people my Lagos-visiting friend had described with such admiration.Here is where many South Africans will pause and say: but they're here illegally. And they're not wrong. The majority of these foreign nationals crossed the border without documentation. No visa. No work permit. No official sanction of any kind.That fact deserves honest engagement rather than either dismissal or weaponisation.Yes, illegal immigration is a breach of sovereignty. Every country has the right to control its borders, and South Africa's failure to do so is a legitimate governance complaint. But before we reach for that argument too quickly, it is worth asking: what kind of desperation drives a human being to walk hundreds of kilometres, cross a militarised border in the dark, and build a life in a country where they can be expelled — or beaten — at any moment?The Malawian who tends the gardens of Johannesburg's northern suburbs did not wake up one morning and decide to game South Africa's immigration system for personal advantage. He left because Malawi's economy, one of the poorest on the continent, offered him nothing. .The Zimbabwean spaza shop owner did not choose illegality as a lifestyle. He chose survival over paperwork, because the paperwork was designed by a system that had already failed him completely. The Somali who stocks his shelves at midnight fled a country where the state had essentially ceased to exist.Marcus Aurelius, whose Meditations I return to often, wrote that we should always ask of any person: what were the circumstances that shaped them? It is the question that separates judgement from understanding. South Africa’s millions of undocumented foreigners are not criminals by disposition. They are people who made a rational calculation that the risk of crossing a border illegally was smaller than the certainty of remaining in destitution.We can hold two things simultaneously. Their entry was unlawful. And the conditions that drove them here were unconscionable. Both are true. Neither cancels the other.The easy response is moral outrage at the violence. And yes, what is happening is indefensible. No argument there.But outrage, however justified, explains nothing. And in South Africa right now, we desperately need explanation. Because this keeps happening. Every few years, the same scenes. The same victims. The same hollow condemnations from politicians. And then, silence, until the next time.The late Charlie Munger, whose clarity of thought I was privileged to observe in person across eight Berkshire Hathaway AGMs, had a formula for problems that refuse to yield to frontal assault. "Invert," he'd say. "Always invert." Don't ask why xenophobia erupts. Ask what conditions make it ‘inevitable’. Then address those..Invert the question and the answer arrives quickly: Unemployment.South Africa has carried an unemployment rate above 30% — or above 40% on the expanded definition — for years. Youth unemployment nudges 60% in some provinces. Those without work are not statistics. They are human beings. Young men, mostly, with energy and ambition and nowhere to put either. No job. No prospect of one. A government that has promised, and failed to deliver, for three decades.Into that vacuum walk the foreign nationals. And here is where it gets complicated, because the economic analysis requires honesty rather than sentiment.Those Nigerian traders, those Somali spaza shop owners, those Zimbabwean artisans, those Malawians and Mozambiquans who have quietly become the backbone of suburban gardening from Constantia to Waterkloof — they are doing precisely what Adam Smith described in The Wealth of Nations just over 250 years ago. They are following the invisible hand. Applying their skills and energy where the market rewards them. Serving communities that were previously underserved. Often working eighteen-hour days, sleeping in their shops, reinvesting every rand. Or sending it - often at extortionate banking fees - because for those at home it can make the difference between eating or not.And doing all of it, in most cases, without a single piece of documentation to their name. Which makes their industriousness not less remarkable, but more so. They have built livelihoods in the shadows of a legal system that does not recognise their existence — paying taxes on every purchase, contributing to an economy that officially pretends they aren't there.But that is the view from 30 000 feet. At ground level, in a Durban hostel or a Johannesburg township, the view is entirely different. What a young unemployed South African sees is not an economist's elegant theory of comparative advantage. He sees a foreigner — often an undocumented one, someone who entered without invitation or permission — behind the counter of a shop that could have been his. He sees competition he cannot match — not because the foreigner is smarter, but because the foreigner is more desperate, more willing to sacrifice comfort, more free of the social obligations that make it hard for a township resident to charge his cousin full price for a loaf of bread.That the foreigner's desperation may be even greater than his own is not a thought that comes easily when you are hungry and angry and looking for someone to blame..That tension is entirely real. It deserves to be understood, not dismissed.The tragedy is that the two groups burning each other's livelihoods are not natural enemies. They are, in Nassim Taleb's framing, being made to absorb the fragility that the system above them has created. When governments fail — and South Africa's government has failed spectacularly on the only metric that matters to ordinary people: jobs — the pressure has to go somewhere. It goes sideways. The hungry fight the hungry, while those responsible for the hunger watch from a safe distance.President after president has stood at a podium and declared xenophobia "un-African," as though the problem were a question of manners rather than economics. It is not. It is a jobs crisis wearing a frightening mask.The fix is not a social cohesion campaign. It is not another government task team or another round of strongly-worded statements from civil society. Those are the equivalent of treating a burst pipe with a press release. And we’re all sick to death of that…. The fix is work. Formal, dignified, fairly-paid work — enough of it that a young South African does not experience a foreign entrepreneur's success as a personal humiliation. That requires the kind of structural reform this government has spent thirty years avoiding: flexible labour markets, reduced regulation on small business, a genuine war on the corruption that has hollowed out every institution meant to drive growth.Warren Buffett has a line about only finding out who's been swimming naked when the tide goes out. South Africa's tide has been going out for a long time. What xenophobic violence exposes is not hatred — or not primarily hatred. It exposes the consequences of three decades of economic mismanagement, laid bare in the most brutal way possible.The foreign nationals being chased from their homes did not cause this. They are, if anything, a mirror. Showing South Africans what hunger and determination, unencumbered by a failing state, can achieve.That is an uncomfortable truth. But it is the only one worth confronting for any prepared to consider this rationally. As we all should be doing. .*Alec Hogg is the founder of BizNews.com.Sign up for your early morning brew of the BizNews Insider to keep you up to speed with the content that matters. Register here.Support South Africa’s bastion of independent journalism, offering balanced insights on investments, business, and the political economy, by joining BizNews Premium. Register here.If you prefer WhatsApp for updates, sign up to the BizNews channel here.