As CNN’s Diana Magnay reported on the bombs falling on Palestinian heads from Sderot on the Israel-Gaza border last week, a crowd of Israelis whooped and cheered. Watching the missiles and explosions light up the sky was, Magnay declared on-air, “an astonishing, macabre and awful thing”, but these locals had a different slant. “Israelis on hill above Sderot cheer as bombs land on #gaza;” she tweeted after the broadcast ended, “threaten to ‘destroy our car if I say a word wrong’. Scum.” Twenty minutes later, the tweet had been deleted, and CNN later reassigned its reporter to Moscow – actions which, in the social media age, guarantee a story goes viral.

A few days earlier, photographs emerged of young residents relaxing on folding chairs as they watched the bombing. Some smoked water pipes; others had brought popcorn. On one level, the “Sderot cinema” sums up the asymmetry of this so-called conflict: of Gazans huddled in terror as a military superpower pounds their overcrowded, besieged open-air prison camp; while on the other side of the border, Israelis joyously celebrate their country’s military might, whatever fear they have of Hamas rockets eclipsed by the thrill of bombs detonating in the near distance. It is also illustrative of how occupations corrupt the occupier. “What a misfortune it is for one nation to subjugate another,” Friedrich Engels wrote in 1864, referring to Britain’s oppression of Ireland. “All English abominations have their origin in the Irish pale.” And so it goes with Israel and Gaza.

An important caveat is, of course, that most Israelis would not dream of treating a military offensive that inevitably spills blood as though it was a perverse video game. This is an extreme example of what occupations do to the occupier. To regard the lives of those your country is subjugating as being equal to your own would make even one death intolerable. If you think their children are much like your own, you would be unlikely to believe any military operation that kills dozens had a justification; you would demand an alternative strategy, however difficult it might at first appear.

It is believed that sociopaths make up just 1% of any given population; the rest of us have an enormous potential capacity for empathy. But empathy relies on a sense of shared humanity; once that is obliterated, it is possible to tolerate almost limitless suffering. That is why occupations have to “other” the occupied – because otherwise subjugation becomes impossible.

It is a process that is far from unique to Israel. The same phenomenon is evident throughout Britain’s colonial history: from Ireland, and the dehumanisation of its inhabitants, to events more recent than many of us would like to admit. In 2012 AT Williams published A Very British Killing, about the death of an Iraqi hotel receptionist at the hands of occupying British troops in 2003. Along with nine other civilians, a sandbag was placed over his head, he was bound with plastic handcuffs and subjected to humiliation and casual violence until he was beaten to death. In January, a 250-page dossier documenting allegations by Iraqis of torture, mock executions and sexual assault at the hands of British troops was submitted to the international criminal court. Such behaviour is all but inherent in any occupation.

There is a crucial difference with Israel, and it is too often downplayed or poorly understood by supporters of Palestinian justice. The moral corruption that comes with any occupation has fused with the collective trauma of the Jewish people. Angela Godfrey-Goldstein is a peace activist in Jerusalem: she tells me that Israel’s mentality “is very easy to understand in a way where people were traumatised over centuries. It bred a sense that people owe us, of ‘who are you to tell us what to do?’.”

A fellow human rights activist in Tel Aviv agrees. “In Israeli society there is a victim mentality that is deeply, deeply rooted in the Holocaust and encouraged by those in power, even though at the moment we’re not victims, we’re an incredibly powerful country with an incredibly powerful military.” The Jewish people faced persecution for millenniums: the 1190 massacre of the Jews at York, the pogroms of tsarist Russia, the Dreyfus affair of France. It culminated in a systematic, industrialised attempt at extermination in the Holocaust. There are Jewish people alive who remember SS guards screeching at them; some still have death camp numbers tattooed on their skin. “What has changed since the Holocaust is our ability to defend ourselves by ourselves,” declares Binyamin Netanyahu, and you can see why it resonates. The all too recent memory of the gas chambers encourages the sense that Israel can never be too strong, and that its people can never be oppressors.

When Palestinians die, says Israeli human rights organisation B’Tselem spokeswoman Sarit Michaeli, “Israelis don’t deny [they] have died, but they’ve simply done a mental process that blames the Palestinian deaths on Palestinians themselves.” Gaza residents are homogenised as Hamas supporters – even though most were not of voting age when the group was elected in 2006 – justifying collective punishment.

For those who want peace – including an end to the occupation and the dismantling of every settlement – it is tempting to demonise Israeli supporters of this latest offensive. But it is futile and self-defeating. The occupation will not end until the rationales that sustain it are understood. As Palestinian children are killed, that may seem like a lot to stomach, but it is no less necessary.

Twitter: @OwenJones84

• This article was amended on 21 July 2014. Hamas was elected in 2006, not 2007, as was originally stated

