The thing about legality is that you kinda get to chose. In your case the companies' interests weight more than the people's interest.
For example in the US it's totally legal to spy on your employees with key loggers &co, in most of Europe it isn't