There is a saying: There are friendly foreign governments, but there are no friendly foreign intelligence agencies.
Most nations in the world have at least one agency devoted to espionage and/or counter-espionage. How well those twin missions executed can have a major impact on how well a nation does, and if performed right can give a nation a major advantage over other nations. Thus, any nation without an intelligence agency of some sort is at a distinct disadvantage, and is either too poor or too incompetently led to be a serious threat to any nation with a more than token military.
Thus, when other countries steal our secrets I don't get mad at those countries. I just want the various intelligence agencies here in the US to work extra hard to prevent more secrets from being stolen and for the US to retaliate against whomever stole the secrets. And when we're the ones stealing secrets from other countries I want our government to do its best to avoid any serious repercussions. After all, when it comes to intelligence gathering, even among allies, it is not a case of "want". It is a case of "need". It is immoral for a nation to not gather intelligence, engage in counter-intelligence, attempt to reprise against those who steal it's secrets, and attempt to avoid reprisal when it is caught stealing secrets.
The problems come when intelligence agencies spy upon the citizens that they're supposed to protect.