Some of this has to be illegal, but in a "we never really enforce it, and you think we're gonna send those guys to prison?" way.
Also, it seems kind of inevitable once people in the government and military start thinking of the flow of information as one more aspect of the war strategy.