According to the British born spin-doctor John McTernan, his former boss Julia Gillard lost her position as prime minister due to “”deep-rooted misogynistic forces””. In Britain”s Daily Telegraph last Friday, he wrote that “”there exists a very powerful sense of mateship, of male values and a male-inscribed culture”” in Australian society.

It is true Gillard had to endure many a misogynist attack, especially on the social media. This came essentially from right-of-centre individuals including members of the extreme lunar right. But the attack was not constrained by political ideology. Sure, in May 2006 Liberal senator Bill Heffernan told the Good Weekend that Gillard had chosen “”to deliberately remain barren””. But then the former Labor leader Mark Latham, writing in The Spectator Australia on February 5, 2011, declared: “”Anyone who chooses a life without children, as Gillard has, cannot have much love in them.””

Yet if McTernan”s analysis is correct, then Gillard would not have been popular and respected as deputy leader of the opposition, deputy prime minister and in her initial weeks in the job as prime minister. Nor would she have been able to lead Labor to be able to form a minority government in 2010. Especially since, in McTernan”s language, her opponent Tony Abbott was regarded by some as the embodiment of male values.

Gillard”s political demise was primarily due to her broken promise on the carbon tax. There were also too many political mistakes for a prime minister facing an opposition leader of Tony Abbott”s ability. There is another point, rarely mentioned in the media because it is intellectually unfashionable. Australia is a socially conservative country. Not in the inner-city areas of the capitals. But certainly in the suburbs and regional centres. There is no evidence the former prime minister suffered politically on account of the fact she did not have children. This is the choice, or fate, of both women and men. But her single status was a problem.

Gillard was not merely the first woman to reside in The Lodge. She was also the first unmarried prime minister in modern times. The Liberal Party MP William McMahon married Sonia Hopkins in 1965 at age 57, on the eve of Sir Robert Menzies” retirement as prime minister. In the 1950s and “60s the left had circulated rumours that McMahon was a closet homosexual.

These allegations continued even after McMahon became prime minister in March 1971. As Laurie Oakes wrote recently, a reporter from the raffish Sunday Observer asked Lady McMahon in the early “70s whether she was aware that people were saying her husband was homosexual. Oakes reported that the newspaper, having obtained a denial, headed its story: “”My Billy”s no poofter – Sonia tells.”” In the lead-up to her election to the New Zealand Parliament in 1981, Helen Clark married her partner. Before becoming premier of Queensland in 2007, Anna Bligh married her partner, who was the father of her children. In socially conservative societies like New Zealand and Queensland, this made political sense.

Gillard not only remained unmarried when living with her partner Tim Mathieson in The Lodge. She also declared that she was an atheist. For someone who was brought up a Baptist, this seemed an unnecessary affirmation since it would have been so easy for Gillard to state that she was agnostic. The problem is that some atheists present as what British historian Michael Burleigh has termed “”sneering secularists””.

There is evidence, which some Labor MPs spoke about off the record, that Gillard”s non-married status and atheism were political problems, especially among migrant groups in the suburbs and regional areas.

The Australian Financial Review”s Phillip Coorey was one of the few members of the Canberra parliamentary press gallery to raise this sensitive matter. On June 24 he wrote: “”A good proportion of voters had a problem with an atheist female prime minister knifing a church-going family man and moving into The Lodge with her boyfriend.”” Kevin Rudd could face a not dissimilar problem, now that he has embraced same-sex marriage.

Unlike ABC1″s Media Watch, Rupert Murdoch”s Fox News employs social democrats and conservatives on its main programs. On the Fox News Watch program last month, left-of-centre Kirsten Powers commented on a Pew Research Centre report that the US media was overwhelmingly supportive of same-sex marriage.

Powers had no problem with this. But she did point out that “”most newsrooms are located in urban environments where people tend to be pro-gay marriage””.

In Australia, most marginal electorates are located in socially conservative environments, far away from inner-cities, where same-sex marriage is not universally endorsed.

Gerard Henderson is executive director of The Sydney Institute.

Correction: The original version of this story said William McMahon married Sonia Hopkins in 1975 on the eve of Sir Robert Menzies” retirement as prime minister. The McMahon marriage was in 1965 and the Menzies retirement was in 1966.