WHY can’t politicians learn to keep their trousers on? There goes Labour MP Keith Vaz, one of the few really effective operators at Westminster, knocked out of his select committee job by a tabloid sting which revealed him consorting with rent boys. There went Stuart Hosie MP, sober and formidable depute leader of the SNP until his affair with journalist Serena Cowdy (who previously had a relationship with SNP MP Angus MacNeil). There, indeed, have gone a sorry procession of politicians over the years, especially since the techniques of secret recording and phone-hacking were learned by journalists.

But the trousers-on question is the wrong one. The right question is why, if the sex is contained within somebody’s private life, the “exposee” has to resign. Vaz seems to have broken no law. It can be argued that using male prostitutes would have implied prejudice when the Home Affairs Select Committee which he chaired dealt with prostitution. But is a big landowner not allowed to sit on a parliamentary committee about farm subsidies? Did none of the male MPs under Vaz’s chairmanship ever get drunk and sleep around during some foreign junket? No, the decisive fact is that Vaz was made to look a total clown. The scenes recorded by the Sunday Mirror were humiliating and grotesque, much like the scenes which brought Lord Sewel down in July, when he resigned from the House of Lords after being filmed allegedly taking drugs with prostitutes.

Remember the Tory MP David Mellor, briefly minister for sport and media? The lurid details of the sex scandal which brought him down in 1992 turned out later to be quite untrue, but the colourful rumour that he’d capered with his mistress Antonia de Sancha in a Chelsea football strip left him hopelessly laughable.

Mellor, like Sewel and Vaz, was an intelligent man with much more to contribute, but the way the media presented their disasters meant that they could never be taken seriously again. A contrast is the tale of Tory trade and industry minister Cecil Parkinson, Margaret Thatcher’s favourite, who fell out of favour when he was revealed to have fathered and ignored an illegitimate baby – but was brought back into the Cabinet a few years later. The explanation for this bounce-back can sound cynical. He was considered to have behaved treacherously and cruelly to the baby’s mother, but – in spite of relentless teasing by Private Eye – he was never made to look a trouserless idiot, so was still considered fit for high office.

There is nothing automatic about the impact of a political sex scandal. The old rule, “don’t get caught”, holds, of course. But the choice of who is to be let off with a nod and a wink and who is to wake up to find the camera mob on the lawn at 6am is arbitrary. It’s about the tabloids’ selection of who to chase. It is about whether you have friends in high places (Vaz, for all his influence and parliamentary authority, did not have many. He seems not to have been much-liked in the House.)

There are plenty of sexually promiscuous people and startling liaisons in public life; there always have been. What’s interesting is who doesn’t get “exposed”, and why not.

The late Conservative MP Alan Clark, erratic and brilliant, went chasing after almost any young female he met and was famous for it. A minister under Margaret Thatcher, he found even the Iron Lady physically desirable – a good example of the aphrodisiac effects of power.

But Clark was never sanctioned, even though all political journalists and most of the Conservative Party knew what was going on. He was “one of us”, and he somehow managed to avoid an open uproar over his treatment of women. LibDem leader Paddy Ashdown, meanwhile, survived 1992 revelations of an affair with his secretary, despite the Sun's "It's Paddy Pantsdown!" splash. Or take the touchingly improbable story of Sir John Major’s four-year affair with fellow Tory politician Edwina Currie, which began in 1984. When it became public in 2002, following the publication of Currie’s diaries, there were smiles but no great scandal. Major was too unpretentious: no fun to puncture. And the newspaper barons feared that feisty Edwina Currie could do more damage to them than they could do to her. Both survived intact.

Odd, isn’t it, that the tabloids are strikingly nervous about going after the sexual morals of women in public life. It may be that readers who lap up stories about high-heid fellows misbehaving would be genuinely shocked to be offered pictures of a high-heid lady being serviced by a gigolo.

It was the BBC, not a newspaper, who in 2010 exposed Iris Robinson, MP and wife of Northern Ireland’s then first minister, Peter Robinson over a murky financial deal with her 19-year-old lover. The affair eventually brought both Robinsons down. Pious Loyalists were as appalled by the sex as by the money. Cue for Edwina Currie who, noticing that Iris Robinson was on record for denouncing homosexuality as an abomination in the sight of God, took the chance to call her “a stinking hypocrite”.

And all this happens in the weird dream-world of

tabloid morality and public appetite. The British tabloid press, even today, is stuck in an archaic moral universe which was disintegrating as long ago as the 1930s. Adultery and fornication are sins which forever stain a man’s honour and disqualify him for public office. Divorce is almost criminal. An “illegitimate” birth is a dreadful calamity. A man who buys sex is a scumbag, probably an immigrant.

Nobody believes any of this, of course. The public knows well what damage and grief broken relationships can cause, but it has also learned how to live with them. Neither do people panic over fatherless babies, as their grandparents might have done. Their tolerance is well reflected in almost every popular television and radio soap opera. And yet this same public adores reading red-top sex scandals which transport them into Victorian expectations of sin and punishment.

But if the readers don’t believe in that world, neither do the journalists who serve it up. It’s a game, played on an antique board whose rule-book has most of its pages missing. Its origins, perhaps, lie in the non-conformist values of the proprietors who set up the cheap popular press at the end of the 19th century, some of them high-minded Quakers or Presbyterians.

In their day, those press barons were right to assume that the new mass readership held severe Christian values, which they expected their upper-class political rulers to observe.

The journalists who wrote the stories soon developed a quite different ethic. When I worked in Fleet Street, many years ago, the pubs were full of thirsty reporters working for the “diary” gossip columns. Their job was to go after sex and drug scandals among London’s high and mighty. And to get their stories they gatecrashed debutante parties, posed as waiters at grand dinners, seduced female telephone operators on switchboards or bribed hotel staff to let them put on uniforms and carry breakfast into the bedroom where the Hon Arabella and His Grace of Barsetshire might be blearily waking up together.

No upholding of Christian morality for those journos. With a twisted consciousness, they thought of themselves as Levellers and revolutionaries, almost as terrorists, savagely puncturing the hypocrisy of the rich and powerful, raiding into the locked castles of the Establishment and exposing their mindless abuse of privilege.

It wasn’t prudent to suggest that they were merely grossing up the profits of super-rich Rothermeres and Beaverbrooks, by providing them with titillating pap which screened off the real sources of injustice.

Those years also taught me how much newspapers – and not only the tabloids – knew that they didn’t use. “There’s this officer in the Soviet Embassy,” muttered somebody to me in El Vino’s, “and turns out he’s sharing this tart with a Cabinet minister. Somebody supposed to be in charge of our defence.” That was the first time I heard about what was to become the Profumo scandal, the affair between John Profumo, the married Secretary of State for War in Harold Macmillan’s government, and 19-year-old aspiring model Christine Keeler. But it was many months before anyone published a word about it.

Everyone reporting the political world of the 1950s knew about Lady Macmillan’s alienation from the prime minister and her relationship with Bob Boothby, the Tory politician who became Baron Boothby. But nobody made a “Mac’s wife in romp with peer” splash out of that. It only emerged years later, in respectful biographies.

Knowing so much about the bad behaviour of the elite, the tabloids can afford to choose who to monster. Sometimes it is just revenge: David Mellor, politically ruined by the News of the World, had infuriated the media lords by warning in 1991 that the press was “drinking in the last-chance saloon” and hinting at government action to curb their excesses and lies. Sometimes, as in the Jeremy Thorpe scandal with its Gothic brew of gay boys, gunshots, dead dogs and high politics, it would have been sheer betrayal of journalism not to have gone after it. (Thorpe was the Liberal Party leader whose career was ended in the 1970s following claims he had hired a hitman to kill and silence a gay lover.)

But the choice of which celebrity with his or her pants down goes under the spotlight and which is allowed to stay in the dark remains unpredictable.

So, still, do the consequences of a political sex scandal.

The gravest followed the fate of Charles Stewart Parnell, leader of the Irish Home Rule party at Westminster. Many people knew about his affair with married Kitty O’Shea, but when her husband sued for divorce in 1890, the non-conformist public of Britain rose in outrage. Mr Gladstone gave in to them, forcing the Home Rulers to ditch Parnell and split their party – a disaster which contributed to nearly a century of intermittent bloodshed.

Moral feeling then was at least sincere. Today, readers with tolerant private views about sexuality nonetheless accept a fake set of moral rules from the tabloids and impose it on their politicians. Some of those politicians are shown to be hypocritical idiots: they are no loss. Others are valuable people, unnecessarily sacrificed to appease a media storm.

But the big change is that homosexuality by itself has lost its sex-scandal traction – in Britain, if not in Ulster. Those gay politicians in Holyrood or Westminster who came out in the last couple of years did so on their own initiative, not because they were “outed” by journalists. Older constituents may have shaken their heads, but news editors shrugged.

Most members of the House of Commons have always had a pretty good idea of which colleagues were gay. They usually kept such knowledge to themselves or their friends, and tried to see that it didn’t “get into the papers”.

Lobby correspondents knew too, just as they knew who was having a heterosexual affair with whom, but they tried to discourage their news editors from sex-scandal stories. For one thing, those stories shatter the precious trust between politician and journalist, the confidence that the reporter can keep a secret.

Parliaments are erotic places, anyway. It’s not just the sexiness of nearby power, nor the politicians far from their spouses and dazzled by a metropolis. It’s the place itself, Holyrood but especially Westminster: the warm labyrinth of corridors and an infinity of small, darkened rooms in which secrets have been whispered for generations.

Doors lock quietly; there’s a couch; what two insiders do in here can’t possibly be accountable to petty mortals outside. But maybe he has a hidden recorder, and maybe she is an undercover hack from The Sun. Lawmaker, keep those trousers on.