I agree with you on this, if the government needs to hide stuff and dislikes it’s citizens knowing what it’s doing, there is a problem. We should know what our government does so we can protest things like killing civilians. If the government represents the citizens, it should be transparent with them
There are -must be- limits to transparency for a government to function - to even
exist. Any government is going to have spies in other nations (even mostly friendly ones), and revealing the wrong documents can reveal those spies. In more liberal countries, this could be handled quietly enough (Britain knows the US has spies in Britain, and vice versa - the worst that will happen is a quid-pro-quo deal) unless it leaks to the press - at which time it creates a public scandal that can bring down politicians or entire governments. In less liberal countries, spies that are revealed are likely to face summary execution after thorough interrogation by torture.
Any government is going to have military forces operating covertly - for missions ranging from counter-terrorism operations, surveilance, all the way through "since you don't know where our troops are in this country, you can't attack ANYWHERE without risking killing our guys and starting a war with us!" tripwire forces. Leaking the wrong documents into the wild, and you get Benghazi.
Any government is going to have technologies that they don't want distributed for very good reasons. Leak the wrong documents, and you could wind up with a megalomaniac dictator able to produce nuclear warheads and sophisticated missile systems.
More to the point, Assange is NOT a "all goverments must be transparent" saint. He's only revealed American and NATO secrets. Russia? He doesn't make any attempt to crack open Putin's wall of secrecy - he praises Putin and uses him for shelter. This is the real danger - even if we assume that every single Wikileaks document is 100% accurate, they are being released under the direction of an open lackey to an outright dictator that is hostile to the United States. Not only that, there's records of the organization offering to aid the Trump campaign directly, and to publish "evidence" of pro-Clinton voter fraud should Trump lose. There's a near-certainty among the global intelligence community that the DNC papers that Wikileaks released came straight from Russian intelligence as part of the (proven) Russian plan to interfere in the 2016 election. The organization has even gone so far as to produce baseless claims that the Syrian nerve gas attack of April 2017 that killed dozens of civilians and injured hundreds more was a "false flag".
Assange isn't a hero, and Wikilieaks is not the chaps in white hats. They're part of the propaganda wing of a dictator who uses them as a cheap way to harm his greatest rival.