The unedifying political bidding war between leaders determined to prove their hostility to refugees has led many to conclude that the Labor and Liberal parties are now entirely driven by opinion polls.

But that's not quite the case.

After the death of Private Nathan Bewes in Afghanistan - the sixth Australian soldier to be killed in the last month - Julia Gillard declared her intention to stay and fight. She was immediately supported by Tony Abbott.

What makes this outbreak of bipartisanship so interesting is that surveys show a clear majority of Australians - some 61 per cent - opposing the war. On this issue, at least, both parties are prepared to stare down the polls, in a way that they simply aren't about refugees.

Why is that? What makes war different?

It's a particular moot question, given how thin the official rationale for the Afghan intervention has become.

"There will be Australians today who are asking themselves in the face of this loss why as a country do we continue to pursue our mission there," Gillard said.

"We pursue that mission because Afghanistan is a safe haven for terrorists."

In fact, CIA director Leon Panetta recently acknowledged that Afghanistan contained less than 100 Al Qaeda militants - perhaps as few as 50. Are we really fighting a war against 50 people?

There are, of course, many other counties around the world where terrorists can find safe havens. Panetta, for instance, says Al Qaeda is largely based in Pakistan, one of our allies.

In any case, as Clive Williams, a supporter of the war, argues:

'In fact, our military presence in Afghanistan is more likely to lead to acts of terrorism in Australia than prevent them. The terrorism threat to Australia, as the Prime Minister acknowledged when launching the Counter-Terrorism White Paper on 23 February, is home-grown extremists.'

So why then do we fight? And what is it about war that makes opinion polls irrelevant?

Michelle Grattan puts it like this : "Australia will stay in Afghanistan as long as the Americans want us to, which means as long as the US is there. It is one of those commitments to the alliance. We do it even though the prospects of "victory" are probably bleak."

Williams, like most defence insiders, concurs.

'The real reason [for Australian involvement] is maintaining the close alliance with the US... Given our real reason for being there, we are more likely to score points with the US if we accept a prominent role, rather than hiding behind someone else's possibly less competent leadership.'

Get that? We are there to score diplomatic points. The alliance with the US requires periodic irrigation with the blood of uniformed young men - and now is just one of those times.

Commitment to the US alliance has been an elite consensus ever since John Curtin and the Second World War. There's no better way of illustrating the role it plays in our politics than by looking at the career of Mark Latham. In his Diaries - surely the most bizarrely revelatory book ever written about Australian political life - Latham notes that "the US alliance is a funnel that draws us into unnecessary wars".

In a subsequent AM interview promoting the book, he explained:

'I think we should have a look at how New Zealand has made itself the safest country in the world. There's no terrorist threat to New Zealand that's been identified, but one here, because if you go supporting bad American policy you make yourself a bigger target.

Now, as we've seen, Clive Williams thinks Afghanistan makes a bigger target and Michelle Grattan says the US alliance has dragged Australian into a probably unwinnable war. In other words, Latham was articulating a view very similar to that expounded by these two impeccably mainstream figures.

What was the reaction? Robert McClelland, then Opposition defence spokesman, immediately declared:"There is no doubt that Mark Latham would not have been elected as leader of the Australian Labor party had he indicated these views."

That's almost certainly true. In fact, when he actually led the party, Latham expressed himself quite differently. As Leader of the Opposition, he famously gave press conferences in front of the US flag. And, when speaking, at the Australian Institute of International Affairs, he said nothing about his funnel theory. Instead, he explained that 'the maintenance of the United States Alliance' was 'a central pillar in Labor's foreign policy.'

Indeed, as leader, Latham behaved in a manner entirely consistent with McClellan's boast that 'the Australian Labor Party has a 65-year commitment to the United States alliance.'

For the attitude to the US is about more than political orthodoxy - it's, in many ways, a test used to decide whether a candidate's really a legitimate politician at all.

Consider the reaction of The Australian foreign editor Greg Sheridan to Julia Gillard's ascension.

'Gillard is the first figure notionally from the left of the Labor Party to lead the party in government and become prime minister.

'The reason there was an informal bar on someone from the Left becoming leader for so many decades was that the Labor Left was tainted by anti-Americanism and, before that, during the Cold War, by an ambivalent attitude to communists in the union movement and a sense of unreliability generally on national security.'

Nonetheless, Gillard, Sheridan assured us, was OK. As he wrote in an earlier column: 'Like Rudd, and like all successful Australian politicians, Gillard is completely committed to the US alliance.'

Sheridan there hints at what confronts any politician - particularly a Labor politician - who does not aggressively align Australia with US foreign policy. As Latham told AM:

'[Y]ou've got in Australian politics […] a little American club, where your Kellys and Sheridans and journalists like that, and your American barrackers like Rudd and Beazley, they're in the junket club where they get all these free trips to the United States for this dialogue thing they have and other forms of largess. And they start the policy debate by saying no matter the issue, no matter the circumstances, what they need to do is work out how do you support the United States of America?'

Any leader who diverges from the foreign policy consensus will face a mobilisation of elite opinion aimed at establishing their political illegitimacy and maintaining Sheridan's 'informal bar' on a less avowedly pro-US position.

That's why, on this issue, the polls matter far less than they do when it comes to refugees.

After all, do people in those key western suburban swing seats really care very much about the progress of gunfights in Afghanistan's Oruzgan Province? Of course they don't. In fact, they'd probably quite like to see some of the resources thrown into warfare deployed more productively closer to home.

But no matter how popular ending the war might be to voters, it's never going to fly with the foreign policy establishment. A politician who dared to call for the war's end would immediately face a relentless barrage of vilification from all the big guns of the media. And the truth is that it's much easier and politically safer to sound tough on refugees than it is to defy the consensus of that elite.

Jeff Sparrow is the author of Killing: Misadventures in Violence, the editor of Overland literary journal and a research fellow at Victoria University.