There's a difference between a whistleblower wanting to expose things that violate the constitution because they want those things to stop, and a foreign agent exposing the same actions, but with the intent to destabilize people's trust in their government.
The end result might be the same. But to say it doesn't matter where a leak came from, is to also say that whistleblowers are no different from foreign spies.
Update to add my bias here: This is why I can respect the actions of Edward Snowden, but find Julian Assange completely untrustworthy.