Companies are simply enforcing the law, right or wrong.
You have some arguments for that I'm not aware of perhaps?
Do no obvious counter-examples spring to mind for you regarding that? ;)
Whatsapp is famous for doing this before, and then Facebook killing this for "regulatory concerns". I don't know for sure, but the previous owner of Whatsapp and founder of Signal implied that Facebook got threatened by states into doing that.
But FB/Google/Amazon/... are the tip of the iceberg. The companies really used for "enforcing the laws" (and for using very harsh measures against individuals just to make some government department's job a little bit easier) are banks.
https://www.taxsamaritan.com/tax-article-blog/reasons-the-ir...
(note the wording here: "the IRS has full authority to". They can do this at will. This process has been used to cause problems for political opponents as well. Nobody seems to care)
Now... They could comply with the law by not hoovering up as much data as they do, thereby becoming useless to both advertiser and law enforcement alike....
But that jeopardizes their business model.
https://en.wikipedia.org/wiki/Data_retention
https://edri.org/our-work/a-beginners-guide-to-eu-rules-on-s...
The companies profit from this data, but at this point they no longer have a choice: they have to collect the data or stop offering services in a lot of geographical areas. The point that they can avoid it by not collecting it was valid some 15 years ago, but no longer.
One of the main objections of companies is, by the way, that most governments refuse to pay the sometimes extensive development and infrastructure costs for this, instead just threatening the companies with (often illegal) measure to force their compliance.