Jared O’Mara has to prove he has been on a journey. Around 15 years ago, the Labour MP for Sheffield Hallam wrote vile homophobic and sexist comments online. If he had written them recently – including “poofters” and “fudgepackers” – he would have to resign as an MP.

By explaining why he had these nefarious views and how he came to reject them, he can help set an example in what remains, after all, a society steeped in sexism and homophobia. Given allegations of far more recent sexism, O’Mara’s political future depends on showing he’s a man transformed. Committing to spending a lot of time – not a token meeting or two – being educated by LGBTQ activists, feminists and women’s charities would be a very good start indeed. Labour MP Naz Shah is a model case study here. After deploying antisemitic tropes, she went on a thorough journey, meeting representatives of the Jewish community, and subsequently making a detailed apology explaining her previous ignorance and what she had learned.

Homophobia is a byproduct of sexism. It is a means of policing what it means to be a man

That he expressed a combination of sexism and homophobia is grim but unsurprising. Homophobia is a byproduct of sexism. It is a means of policing what it means to be a man. Those who don’t conform to an unreconstructed form of masculinity are liable – certainly in their youth – to be subjected to homophobic abuse. “Stop being such a poof”, “are you bent or something?” and countless other derivatives.

This teaches LGBTQ people from the earliest age that society regards them as inferior, and inflicts terrible – in some cases irreversible – mental damage on them. It also damages straight men too, incidentally, because they end up believing that talking about their feelings is “unmanly”, which is partly why the biggest killer of British men under 50 is suicide.

The struggles of both feminism and LGBTQ activists has transformed social attitudes. British society is a story of millions of individual journeys. In 2003 – around the time of O’Mara’s indefensible comments – 40% of Brits thought sexual relations between two adults of the same sex was always or mostly wrong. Just 37% opted for “not wrong at all”. In last year’s survey – just 13 years later – 64% opted for “not wrong at all”. It represents an astonishing revolution in attitudes, and in such a short space of time – even if there is still so far to go.

Of course, I am now open to the charge of hypocrisy. If this was a Tory MP, I would be demanding his immediate resignation – that’s what some of you are thinking. On my phone, I have messages from 2005, sent to me by a Tory who stood for parliament just months ago. If the polls had been right, he would now be an MP. He called me a “leftwing faggot” and described homosexuality as “unnatural and immoral”. If it was clear he had now abandoned this level of bigoted hatred, I would both forgive him and welcome the transformation in his attitudes. Without these journeys, after all, how will anything change?

And indeed, the Tories made opposition to LGBTQ rights one of their defining political missions. From section 28 to age of consent to the right to adopt, this party has repeatedly attempted to subjugate and oppress LGBTQ people. Even equal marriage did not command the support of most Tory MPs. The Tory foreign secretary Boris Johnson makes repeated and unapologetic vile and bigoted comments, but receives no outpourings of Tory outrage.

O’Mara has rightly resigned from the women and equalities committee; the Conservative Philip Davies – who has dedicated his political career to opposing women’s rights – remains. But unlike previous generations of MPs, younger MPs have a colossal digital footprint. Most MPs have said stupid, even unacceptable, comments in private: but the communications revolution means there is a permanent, public record of terrible things many have said in earlier days.

If we don’t want identikit, robotic politicians, then we have to accept MPs who once sprayed their stupidity and bigotry online – as long as they prove they have learned from their mistakes.