Not that I want to defend any intelligence organisation but war is not a binary thing. Other countries might be harming your country even without you knowing it. Agencies try to prevent that from happening.
Not an expert, but as secret stuff gets leaked it tends to create huge public discourse and leads to political action.
Knowledge about their actions does seem to have an effect on the country. Secret service staff would probably not necessarily evaluate it as a good effect though.
> Knowledge about their actions does seem to have an effect on the country.
Can you give me an example?
Take the latest Wikileaks Vault thing for instance. That was a leak that created public discourse, what was the effect?
I still don't trust my iPhone and pretty much most of the software I use, were any 3 letter agency looking to get me.