> But if someone proposed that all restaurants should perform chemical analyses on random samples of their food
To be fair, people propose things all the time. It only becomes law when enough people agree that it is needed. That process isn't always perfect but in general it works.
The reason we don't have a "General Food Safety Regulation" is that the current situation is good enough, either because the existing regulations are sufficient or that the industry can self-regulate (as it's usually bad for business to poison your customers). As a result, in most Western countries, you can be confident that any business that sells food will not poison you.
If we suddenly had a food poisoning epidemic because all vendors were unscrupulous and selling spoiled food, I would totally be in favour of stronger regulations even if it means small taco shacks can't compete. Having to go to a farther/more expensive place that can afford such checks is a price I (and I suspect most other people) am willing to pay if it means not getting food poisoning.
The GDPR came to be because it was determined that the existing data protection regulations were inadequate and the industry demonstrated that can't be trusted to self-regulate.