Something is wrong. A ­sensible, clean-living chap such as David ­Miliband wants nothing more ­sinister than to lead the Labour party, yet he finds himself consorting with spies, lawyers, rendition merchants and torturers. His only ­experience of coercion was waterboarding British school teachers with targets and red tape. Now he must defend the interrogators of Guantánamo and explain away the bloodstained cells of Pakistan and Morocco.

Whatever plaudits were due to ­Foreign Office lawyers during the ­Chilcot inquiry have been expunged by this week's revelation of their antics in trying to conceal details of post-9/11 ­torture by British agents. The security services were clearly implicated in the brutal questioning of the Guantánamo inmate, Binyam Mohamed – treatment so bad as to render his trial unsafe and force his release.

Papers revealed by the high court depict a Foreign Office running about stamping on a stream of embarrassing disclosures, largely because Miliband was desperate not to seem a wimp in front of his hero, Hillary Clinton. We now know that both Miliband and the head of MI5, Jonathan Evans, told an untruth in asserting, as the latter said last October, that British security services do not practise torture, "nor do we collude in torture or solicit others to torture people on our behalf".

While the definition of torture is moot, at least five relevant incidents in Guantánamo are admitted. On Wednesday, Miliband was forced to hire the maestro of Whitehall autocracy, Jonathan Sumption QC, to demand that the Master of the Rolls censor his damning judgment of Miliband to avoid giving further pain to ministers. We must assume that Miliband did not trust his own lawyers to do this dirty work. All this is because Britain believes that publishing details of what interrogators did to its residents would lead Washington to retaliate by not warning of an ­impending terror attack on London. The belief is absurd.

How did we reach this pass? The answer has taxed philosophers from Socrates to Hannah Arendt. Even the nicest people go to the bad when caught up in ill-conceived, illegal or unjust wars. Socrates wrestled with the duty of obedience to a stupid state. Arendt noted how easily officials drift down the path of horror when they lose sight of the point where morality calls on them to say no. They sink, she said, into "the banality of evil".

The so-called war on terror saw a politically weak American president seek popularity in redefining a criminal act as a "war between states". Tony Blair agreed. His assertion to the Chilcot inquiry that "9/11 changed everything" was self-serving. The attack was just the latest in a line of attempted terrorist atrocities by Islamist extremists, albeit one that succeeded horrifically.

To call such crimes acts of war gives them rhetorical force, but in no sense did al-Qaida or its imitators threaten the integrity or security of a western state. These countries are too strong for such threat to be meaningful. The only damage they can do beyond sudden carnage is self-inflicted, by governments that decide to react with exaggerated fear. Yet the pretence of "going to war" has unleashed two of the most destructive, costly and prolonged state-on-state aggressions in half a century.

What is extraordinary is the reluctance of British politics to bring a sense of proportion to the terrorist threat. Every agency of democracy, from parliament to the army, the police and the media, is directed at exaggerating the status and menace of al-Qaida – and thus at doing Osama bin Laden's work for him.

Some politicians have clearly had doubts. At Chilcot, Jack Straw claimed to have proposed supporting, but not joining, America in Iraq. As it was, his overt backing for the war was, he boasts, critical since "if I had refused, the UK's participation in the military action would not in practice have been possible". Given his doubts and the weight of legal advice coming his way, it is hard to see him as anything but a man who lacked the courage of his convictions.

Other cabinet ministers are lining up to express their own doubts about Iraq, as they will one day do about Afghanistan. They say that war is "not my department", that they "made Tony aware of my reservations", that it was all America's fault. Yet such was the deceit of these wars, such has been the ­slaughter, the atrocity against civilians, the torture of prisoners, the abuse of human rights – and so few the resignations – that Arendt's banality of evil seems everywhere.

Tuesday's Spectator debate on Afghanistan at the Royal Geographical Society, much attended by soldiers, had the jingoistic quality of Joan Littlewood's Oh, What A Lovely War!. To the oft-repeated question, why are we there, speakers such as General Lord Guthrie and the historian Andrew Roberts pleaded the party line. It was "to make the streets of London safe", to create a stable democratic state in Afghanistan that gave no house-room to al-Qaida, even if it took decades and even if the terrorists "moved elsewhere".

Since this sounded like trying to empty the sea with a spoon, the case for war shifted over the course of the debate. It was to enable Britain "to be a real Nato force", "to show itself to the world", "to cut some ice". The war became a manifestation of patriotism and national potency. Would it not be terrible to be another Germany, France, Sweden, Japan? War did not need just cause, or even efficacy, merely a noble epithet.

The case for being in Afghanistan has become an exercise in verbal sophistry. To Guthrie, we are killing Taliban "to stop them killing us". To Roberts we are doing so to stop them setting off a dirty nuclear bomb, which would "spread cancer over a 30-mile radius", a terrorist-appeasing fantasy debunked in John Mueller's recent Atomic Obsession.

The truth is that mission creep has made this war largely ideological – witness constant ministerial references to Kabul ­corruption, to opium, warlordism and the treatment of women. The streets of London are not being saved in the plains of Helmand, any more than they would be if the fight went to the mountains of Waziristan or the hills of Yemen. To the war party, ­Islam is the problem. It is the regime that must be changed.

Yet an enemy that poses no concerted threat to western territory or western interests has been allowed to damage the west's liberal tradition. Bush and Blair were brazenly unconcerned with international law. We now have it confirmed that they do not care for the Geneva conventions. Such hard-won restraints on the practice of war, such as not bombing civilian targets, not assassinating leaders, respecting cultural sites, treating prisoners humanely, and sustaining the rule of law back home, have been casually set aside.

Like all bad wars, those in Iraq and Afghanistan taint any who touch them. In the next few days, thousands of ­British troops will, yet again, have to fight to clear some Taliban for a while from some patch of Helmand. Ask the purpose of this fight and the answer makes no sense. The means of war may have advanced since the days of Athenian democracy, but the ends not at all.