One gallery veteran put it simply: "We didn't believe the polls." Prime Minister Malcolm Turnbull speaks to the media after stepping off an Australian Border Force patrol boat. Credit:Andrew Meares This election campaign rained polls. Week after week, media outlets published national polls showing a 50-50 tie or at best a 51-49 Coalition lead. The results barely shifted from week one to eight. Yet, as the campaign progressed, a view solidified that the Coalition was on track for a relatively comfortable victory. Yet the Coalition suffered a sizeable swing against it on election night and is struggling to hit the 76 seats needed to govern in its own right.

So what happened? Malcolm Turnbull during a press conference in Sydney. Credit:Andrew Meares "No one believed us!" a senior Labor Party strategist says, insisting he warned journalists they were writing off Bill Shorten too soon. "We were projecting a confidence that many people thought was bravado. Opposition Leader Bill Shorten takes a selfie with media on the campaign bus. Credit:Alex Ellinghausen

"The commentariat fell into a bubble and were reflecting what each other thought. "A narrative caught hold and everyone started reporting it." Malcolm Turnbull strolls the press gallery at Parliament House in Canberra. Credit:Andrew Meares I was struck by how everyone was so wise after the event and so all-knowing With hindsight, there's much to support this .

As Leonardo DiCaprio's character Dom Cobb says in the film Inception: "What is the most resilient parasite? A bacteria? A virus? An intestinal worm?" Many talk now as though Malcolm Turnbull's catastrophic descent into hypocrisy was patently preordained. Credit:Andrew Meares No. It's an idea. "Once an idea has taken hold of the brain," he says, "it's almost impossible to eradicate". Several ideas took hold quickly in the gallery's collective brain. That Australians don't kick out a first term government (despite this happening recently at a state level). And that Malcolm Turnbull's personal popularity was a decisive advantage against the less prime ministerial Shorten.

During the campaign, several events became seen as "turning points" for the Coalition despite the polls never really budging. Labor's admission it would increase the budget deficit over the next four years was one. So was the UK's departure from the European Union. ​The Australian Financial Review's Laura Tingle spoke for many in the gallery in mid-June when she wrote that "the sense that Labor is a serious challenger has faded". And The Australian's Dennis Shanahan on the day before election day: "Malcolm Turnbull is coming home with the wind in his sails, Bill Shorten is running out of puff. The Daily Telegraph, already foreshadowing a challenge to Shorten's leadership, reported on Friday that Malcolm Turnbull was on the "brink of victory". Fairfax Media highlighted a 50-50 poll result but with an unusually strong emphasis on voter expectations that Turnbull would win. Leading commentators on Sky News predicted between 80 to 85 seats for the Coalition, with Peter van Onselen saying he would quit in the event of a hung parliament.

Many had picked up a "vibe" in the community that voters were disappointed in Turnbull, but not sufficiently angry to remove him. There was also the confidence exuded by Turnbull and his advisers. Many of us even convinced ourselves that the low-energy, small-target campaign was a clever way of "boring" voters into backing the Coalition. "You got the impression they were confident and confident for a reason," former Media Watch host Jonathan Holmes says of the coverage. "There was very little scepticism of what was behind that". But if the media were wrong they were hardly alone. Two days before election day the bookmakers - often hailed as more accurate than pollsters - had Labor at $8 and the Coalition narrowing to a near guarantee of $1.08. Many political insiders, too, were surprised by the scale of the swing.

Strategists from both sides agreed early on that Labor would pick up 12 seats at best. A week before polling day Labor strategists were telling reporters they expected to pick up eight to 10 seats. They picked up 14 seats, and may win up to 16. Meanwhile, the Coalition was talking up gains in seats such as Werriwa (easily held by Labor). So, as Insiders host Barrie Cassidy asked, were journalists shown to be "gullible"? Or were they being lied to? Neither, a Coalition strategist says. "Everything I heard indicated the swings for Labor were not happening where they needed to be," the insider says.

Serious questions are now being asked in the Liberal Party about the accuracy of its polling and who had access to it. But Holmes says the media shouldn't let themselves off too easily. "There is certainly a lesson for the gallery about whether they should be less credulous when it comes to internal polling," he says. Particularly when it is being briefed anonymously. Margaret Simons, Director of the Centre for Advancing Journalism at University of Melbourne, says: "I was struck by how everyone was so wise after the event and so all-knowing. "It's easy to write in retrospect where everything went wrong but I didn't see many people pointing it out as the campaign was happening."

Simons offers the example of the eight-week long election double dissolution election campaign itself. Originally hailed as a political masterstroke, it was only after Saturday that many commentators started questioning how wise the decision was. "Journalists," Simons concludes, "were too quick to become part of Malcolm's fan club." In preparing this piece, I asked readers on Twitter and on Facebook for their views of the coverage. Some dominant criticisms emerged: An insistence the Coalition was on track to win (despite the polls predicting a tight result) and a consistent under-estimation of Shorten's performance;

Overly "insular" coverage dominated by conversations with political insiders and other journalists rather than voters

Coverage that was too "presidential", with an intense focus on daily movements of both leaders;

Too much focus on the colour and movement of campaigning rather than the policy offerings of the two main parties;

A lack of co-ordination by journalists, especially in the travelling media pack, to demand answers from the leaders;

More focus on campaigning techniques by third-party groups such as GetUp!