EU is a large union of 27 countries. France is having a big authoritarian turn that started after the 2015 terror attacks, and it accelerated under Macron.
That law would certainly not pass in the majority of EU countries.
Additionally, even though I believe this law is terrible, you can't compare a for profit company collecting information on ALL its users, and a police service collecting information on a few thousands people after a judge allowed them to.