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.
I'm not entirely sure about that. If data is legally collected by a company, who's to say the government can't legally purchase it for their own ends?
More info here: https://commission.europa.eu/law/law-topic/data-protection/r...
Even for a specific purpose and specified people, approved by a judge?
As usual these laws start by being applicable to only terrorists, to make it easy to pass, and then years later their scope is extended...