Regulation is the answer to this race to the bottom. When competing companies can't agree to give employees a break, the government can make some rules.
Also applies to other things companies can't agree to do, like spend some extra money to process their factory waste instead of polluting a river.
Is this about China, or the U.S.?
To be fair, most engineers in the US don't enjoy those perks either
Just like US tech companies. The US conpanies in EU seem to have a strange interpretation of labour laws.
And people wonder why birthrates are collapsing.