Couldn't the government then obtain the information without any judicial oversight? A foreign country is only safe if the software is 100% secure and the employees can't be bribed with government-level resources.
(Look at what the Chinese government did when they wanted information from the New York Times. No judge approved that disclosure...)