precisely why whistleblower laws and policies are around. where something wrong or illegal is happening, a whistleblower brings it out in the world even if it contradicts Non-disclosure agreements they have signed.

whistleblower laws come into picture if government/agency/company is doing anything wrong. In this case it's a strategy to do those spying activities. Even the courts will not acknowledge the agencies did anything wrong.