Just because something is morally/ethically sound doesn't mean it's legal. The part of 'choosing the break the law to expose things for the public good' that makes it heroic is 'choosing the face the consequences of breaking the law'.
So by your logic the guy that exposed 2TB of videos of rapes and tortures in Russian jail recently should have stayed in Russia so that he can face the music and get some first-hand experience? After all he broke laws in Russia and exposed 'secret government data'?
I mean, maybe, if that guy wanted to stay around to try and improve his country. Maybe not if he valued his life.
But that doesn't change the fact that it was a crime, does it? Remember, the comment I replied to was saying that Chelsea Manning did not commit a crime when they leaked secret American military information while a serving member of the US armed forces.
You might - and I would - argue that Manning did something that is a good thing for the world, but that doesn't mean saying that it was a crime is 'post fact'. 'Post fact' is redefining the idea of 'illegal' to be 'only things I don't personally agree with', which is not a definition that survives contact with the real world.
Three Requirements for defence of necessity: (1) Urgent situation of imminent peril or danger (2) No reasonable legal alternative (3) Proportionality between harm inflicted and harm avoided
What if the bread my family needed was millions of dollars in cash from a bank... It was (1) urgent, (2) hard to do get any other way, (3) its not like anybody got hurt anyway.