Surveillance legislation is sold as an anti-terrorism measure, but in practice is used in everyday law enforcement