But we had naively hoped that they were spying on the enemies of the country,
Don't be stupid.
The real enemy of such organizations is not their counterparts in other countries.
It's the subjects of their own country.
All the terrorism/drug trafficking/paedophila is self serving bu***hit.