Law XYZ will cause big tech to spend of resources to comply. Why don't they oppose it?

They don't because this big expense applies to their competition too and raise the cost of entry by a lot. In short they actually like regulation to protect their monopoly as a side effect.