So laws exist, but people don't always adhere to the law for reasons like ignorance and malicious intent. There are also laws which are bad laws & regulation, easily exploitable by clever people, financially lucrative in some cases.
The intelligence services have a difficult task, they need to be on top of their game so they need to know everything and try to prevent problems snowballing unless its not particularly harmful and could be quite educational for future improvement. You have a blank sheet of paper, what would you do to maintain or reduce harm to society?
I say this as someone who has met Andrew Parker, Stella Rimmington and Jonathon Evans and is wise to their ways but not someone who has signed the official secrets but has arguably an "autistic" interest in secrecy and quantifying all walks of life.
Ah man, those poor folks at 3-letter agencies screwing rest of the world and their own citizens. Of course it would be better for them to know everything, have everything, exploit everybody and so on.
That's not how modern democratic society can and should work though