After 17 months of pre-trial imprisonment, Bradley Manning, the 23-year-old US army private and accused WikiLeaks source, is finally going to see the inside of a courtroom. This Friday, on an army base in Maryland, the preliminary stage of his military trial will start.

He is accused of leaking to the whistleblowing site hundreds of thousands of diplomatic cables, war reports, and the now infamous 2007 video showing a US Apache helicopter in Baghdad gunning down civilians and a Reuters journalist. Though it is Manning who is nominally on trial, these proceedings reveal the US government's fixation with extreme secrecy, covering up its own crimes, and intimidating future whistleblowers.

Since his arrest last May in Iraq, Manning has been treated as one of America's most dastardly traitors. He faces more than 30 charges, including one – "aiding the enemy" – that carries the death penalty (prosecutors will recommend life in prison, but military judges retain discretion to sentence him to die).

The sadistic conditions to which he was subjected for 10 months – intense solitary confinement, at one point having his clothing seized and being forced to stand nude for inspection – became an international scandal for a US president who flamboyantly vowed to end detainee abuse. Amnesty International condemned these conditions as "inhumane"; PJ Crowley, a US state department spokesman, was forced to resign after denouncing Manning's treatment. Such conduct has been repeatedly cited by the US as human rights violations when engaged in by other countries.

The UN's special rapporteur on torture has complained that his investigation is being obstructed by the refusal of Obama officials to permit unmonitored visits with Manning. (Even the Bush administration granted access to the International Red Cross at Guantánamo.) Such treatment is all the more remarkable in light of what Manning actually did, and did not do, if the charges are true. For these leaks have achieved enormous good and little harm.

From the start, US claims about the damage done have been wildly exaggerated, even outright false. After the release of the Afghanistan war logs, officials accused WikiLeaks of having "blood on their hands", only to admit weeks later that they were unaware of a single case of anyone being harmed. That remains true today.

Even Robert Gates, the Pentagon chief, mocked alarmism over the diplomatic cables leak as "significantly overwrought", dismissing its impact as "fairly modest". Manning's lawyer is seeking internal government documents that, he insists, concluded there was no meaningful harm to US diplomatic relations from the release of any documents. None of the leaked documents were classified at the highest level of secrecy – top secret – but rather bore only low-level classification.

By contrast, the leaks Manning allegedly engineered have generated enormous benefits: precisely the benefits Manning, if the allegations against him are true, sought to achieve. According to chat logs purportedly between Manning and the informant who turned him in, the private decided to leak these documents after he became disillusioned with the Iraq war. He described how reading classified documents made him, for the first time, aware of the breadth of the corruption and violence committed by his country and allies.

He explained that he wanted the world to know what he had learned: "I want people to see the truth … regardless of who they are … because without information, you cannot make informed decisions as a public." When asked by the informant why he did not sell the documents to a foreign government for profit, Manning replied that he wanted the information to be publicly known in order to trigger "worldwide discussion, debates, and reforms".

There can be no doubt that these vital goals have been achieved. When WikiLeaks was awarded Australia's most prestigious journalism award last month, the awarding foundation described how these disclosures created "more scoops in a year than most journalists could imagine in a lifetime".

By exposing some of the worst atrocities committed by US forces in Iraq, the documents prevented the Iraqi government from agreeing to ongoing legal immunity for US forces, and thus helped bring about the end of the war. Even Bill Keller, the former New York Times executive editor and a harsh WikiLeaks critic, credits the release of the cables with shedding light on the corruption of Tunisia's ruling family and thus helping spark the Arab spring.

In sum, the documentsManning is alleged to have released revealed overwhelming deceit, corruption and illegality by the world's most powerful political actors. And this is why he has been so harshly treated and punished.

Despite pledging to usher in "the most transparent administration in history", President Obama has been obsessed with prosecuting whistleblowers; his justice department has prosecuted more of them for "espionage" than all prior administrations combined.

The oppressive treatment of Manning is designed to create a climate of fear, to send a signal to those who in the future discover serious wrongdoing committed in secret by the US: if you're thinking about exposing what you've learned, look at what we did to Manning and think twice. The real crimes exposed by this episode are those committed by the prosecuting parties, not the accused. For what he is alleged to have given the world, Manning deserves gratitude and a medal, not a life in prison.