Spying is a good thing. Real information keeps people from second guessing each other and prevents cold conflicts from becoming hot.
The most obvious example is when one country manages to uncover another country's nuclear assets to such a high degree of confidence it feels (rightly or wrongly) it can make a 100% successful first strike.