Ben Davis, Victorian branch secretary of the Australian Workers’ Union, was in the offices of the union’s lawyers when the first phone call came through at 4.22pm on Tuesday last week.

Assistant secretary Liam O’Brien was calling from the union office to ask if Davis had any idea why a large posse of media had begun setting up outside.

Davis didn’t know. But three minutes later, he found out. His phone rang again, and this time it was Nick Enright, second-in-charge at the government’s newly established Registered Organisations Commission (ROC), alerting him to the fact that the police were about to raid the union.

About the same time, in Sydney, word reached AWU assistant national secretary Misha Zelinsky, up in the union’s 10th-floor Sussex Street office, that a media pack had gathered in the street below. He sent someone to find out what they were doing. They were there for the raid.

The assembled television crews and other media were granted about half an hour to set up. Then the Australian Federal Police, along with officers of the ROC and state police, arrived in force, in both Sydney and Melbourne, seeking documents relating to a number of donations made by the union more than a decade ago, the largest of them $100,000 to the activist organisation GetUp!

In Canberra, in the office of Employment Minister Michaelia Cash, they watched events unfold on TV. The groundwork for this moment had been laid over a period of several months, and that Tuesday afternoon it looked like everything was going to plan.

The fact that the matter being investigated was ancient, trivial and contested was scarcely relevant. The names involved made the story significant: Opposition Leader Bill Shorten, the powerful union he used to lead, and the left-wing advocacy group that has made an enemy of the government, GetUp! Above all, the visuals were strong. The size and drama of the raids made it look like big news, even if it wasn’t. For a brief while, they served as a happy distraction from the government’s many woes.

This satisfaction at the course of media events lasted barely a day, though. On Wednesday, in a senate estimates committee hearing, Cash denied five times that she or her staff had any involvement in tipping off the media. This was not true. In fact her media adviser, David De Garis, had done so, only confessing after he was outed in an article by BuzzFeed. De Garis resigned, but maintained that he had only heard of the raids from some in the media, and passed the intelligence on to others. Cash claimed not only that she knew nothing of De Garis’s tipoffs, but had no advance knowledge of the raids.

Suddenly, the focus of all interest shifted. The question now was not what the raids might find, but who leaked news of them and who knew about it. Labor was suggesting not only that Cash was lying about the extent of her knowledge, but that the prime minister himself was implicated – “up to his neck” in the cover-up, as Shorten said in question time. The powerful crossbench senator Nick Xenophon, whose vote was vital to the establishment of the ROC only six months earlier, was leading calls for an independent inquiry into the stunt.

In the circus, when something unforeseen happens, when the trapeze artist falls or the lion tamer is mauled, they send in the clowns to distract the crowd. Within 48 hours of the raids on the AWU offices, the government announced there would be an investigation of the leak. Not an independent one, though: one conducted by the federal police themselves.

Talk about sending in the clowns. As a former editor of The Canberra Times, Jack Waterford, noted in a swingeing analysis of the affair: “The silliest joke in the Michaelia Cash leaking affair is the idea that the Australian Federal Police should investigate how information about its raids on Australian Workers’ Union offices found its way to the media 30 minutes or more before the warrants were executed. Tipping off selected journalists in advance of a big operation is a key part of the AFP’s modus operandi.”

“You have to wonder why the federal police were called in at all, because there’s no crime involved in this thing. It’s just that the commission has been given this weird jurisdiction to look into, among other things, any failure by unions to comply with their own rules.”

It was “by no means clear” that the AFP itself was not the leaking party, Waterford wrote.

Of course, there are many possible sources of the original leak. There were state police involved, and scores of people in the ROC, the Fair Work Commission, the minister’s office and department, and the federal police themselves.

As Waterford noted, even if the AFP were not the source of the leak, the chances that they would embarrass the government by finding the guilty party were remote. Having watched closely for 38 years, since the founding of the force, Waterford could think of only one case that caused “any problems or embarrassment to government”. That sole instance of an “exhaustive and completely professional” investigation – the pursuit of former speaker Peter Slipper for allegedly rorting his expenses – failed to get a conviction. In all other political cases, calls by oppositions for investigations into leaks by ministers, staffers or government mates of various kinds went nowhere.

The AFP, for its part, staunchly defended itself against attacks that had not been made. Commissioner Andrew Colvin put out a media statement on Thursday, two days after the AWU raids and the day before Waterford’s piece, complaining: “The AFP has this week been the subject of commentary and innuendo regarding its independence and the ability of AFP members to carry out their work objectively and without political interference.”

He went on to assert that the force “undertakes its activities without fear or favour. The AFP rejects in the strongest terms any suggestion to the contrary. The AFP makes all its operational decisions independently, based on experience, operational priorities and the law.”

On the face of it, the statement seemed like a slap-down of critics. But within opposition ranks, some read it differently. As one noted privately, it was really more of a plea to Labor should it win the next election.

Towards the bottom of the statement, Colvin said: “The AFP has obligations to assist a wide range of other Commonwealth agencies in their activities, including the Registered Organisations Commission. The AFP had no operational reason to decline to execute a search warrant that was authorised by a magistrate.”

That is to say, they were only doing what was required of them.

The trail on the AWU raids leads back to August, and reporting in the government’s preferred media outlet, The Australian, examining the funding and political connections of GetUp!

“Bill Shorten was a big union donor to GetUp! when it was established, giving about $100,000, possibly more, to the left-leaning activist group,” the story, by associate editor Brad Norington, began.

“The revelation, confirmed for the first time to The Weekend Australian, follows the federal Labor leader’s persistent refusal to make any comment over what support he provided to GetUp! when he was in charge of the Australian Workers Union.”

In fact, the union’s support of GetUp! was not a secret. Two donations, of $50,000 each, were declared by the AWU to the Australian Electoral Commission on December 20, 2006 and January 19, 2007.

That’s not to say there was anything wrong with the story, or a series of other stories by the same author. They provided a detailed picture of the relationships between GetUp!, the unions and Labor.

They also provided a pretext, however, for Minister Cash to refer the matter to the ROC, and for the commission to begin asking questions of the union.

“So ROC wrote to us in August, citing The Australian, and asking that we hand over documents,” the union’s Victorian secretary, Ben Davis, says. “We, of course, said no.”

At that stage, there was no formal investigation, and the union was damned if it was going to volunteer information to an organisation it saw as having been set up by an anti-union government to pursue an anti-union agenda, on the basis of stories in an anti-union newspaper.

The stand-off lasted until Friday two weeks ago, when the ROC wrote to the AWU, saying it was starting a formal investigation.

“We were expecting – and didn’t get – a notice to produce [documents]. That’s what they always do. They did it at TURC [the Trade Unions Royal Commission], they’ve done it at ROC before on other matters,” Davis says.

“What I understand actually happened was on Tuesday morning at 9.40am the ROC and AFP went to the federal magistrates court to get two search warrants, one for national, one for Melbourne. And at 4.20 they sought to serve those warrants.”

Subsequently the union obtained an injunction to prevent the ROC from accessing the documents the cops seized.

The deeper you look into the matter, the more peculiar it becomes. The central issue is whether the AWU executive properly signed off on the donations, and the government’s hope is that the evidence will show Shorten gave away the money without proper approval. The AWU is adamant it can prove that the donations were properly approved. It further insists the evidence was provided to the royal commission.

So why, if the union has proof that it acted correctly, would it set about destroying documents, as claimed in the tipoff to the ROC? And why, if it were going to do that, would it not have done

it long ago, given it knew what the ROC was after for at least a couple of months? Why did the ROC’s Nick Enright give the union a heads-up just before the raids? And why, if it has nothing to hide, is the union fighting the matter through the courts?

The answers are elusive. On the last question, though, there is an explanation. The union hopes, through the legal discovery process, to learn more detail about the background to last week’s stunt, specifically the relationship between the government, compliant media, the ROC and police. Daniel Walton, national secretary of the AWU, has promised to release all documents once the legal process is finished.

The union reckons it has little to lose. As it points out, even if the ROC’s darkest suspicions were confirmed, and there was absolutely no evidence that Shorten cleared the donations with the AWU executive, or that the executive signed off on it, the maximum penalty is an $11,000 fine.

As Michael Bradley, managing partner of Marque Lawyers, says: So what?

“You have to wonder why the federal police were called in at all, because there’s no crime involved in this thing. It’s just that the commission has been given this weird jurisdiction to look into, among other things, any failure by unions to comply with their own rules.

“They have this warrant power, which they decided to use, [even though] the documents had apparently been given to the royal commission.

“To me it’s another misuse of the federal police, both politically and functionally. It’s just wasteful. This is essentially the equivalent of a parking fine. It amounts to no more than a procedural failing or an oversight by the union.”

Of course, the political stakes are much higher than the legal ones. If Shorten were found to have done the wrong thing, the government and its associated entities in the media would claim a major scandal.

But as things now stand, the story is all about the leak, not about the donation. Bill Shorten has reason to feel a lot more comfortable than Michaelia Cash or Malcolm Turnbull.

As to The Australian, where much of this story started and has run: just before deadline, the paper’s associate editor got in touch with a brief statement.

“In August, The Australian, acting on its own accord, started its investigation into the history, development, funding and operations of GetUp!” the statement said. “Any suggestion that there was input or assistance from Minister Cash or her office in researching articles that revealed the AWU’s donation to GetUp! in 2006 is false.”

As to the leak: perhaps this time it would be advantageous for a federal police inquiry to actually find something.