Do you want companies to do this in private for private gain and not share it with you? Because making it illegal will just make it happen in greater secrecy.
In other areas of society where a bad thing cannot be stopped, we still use legislation to reduce the amount of it and mitigate some of the harm.