It varies a lot. Quite a long time ago, I worked at a pizza place in a regional chain. That location was kept quite clean, as were most of them. However, sometimes they'd give us the chance to pick up a shift at another location if they couldn't arrange one of their own employees on that day (usually because they called in sick). One such location was absolutely filthy. That location was since closed (grapevine says the chain fired the GM and couldn't find anyone to replace them).
What helps is that there are signs of this sort of thing, if you know what to look for. E.g you should prefer places where you can see into the kitchen (which is most of them these days), places where the customer service workers tuck in their shirts, and places that keep their bathrooms and parking lots clean. Places where police and EMS folks eat really tend to be good bets (they usually also get a discount, but lots of places offer such discounts).
That's the system working as intended. Clean kitchens not only don't get their customers sick, but taste better too. Filthy kitchens go out of business. Most kitchens are clean, because the people who work there keep them clean, the rule in a manual does none of the cleaning, the people do all of it. And people know, come on, people are wise to this shit, they've been told not to trust their sense of taste in order to accept medicine that is clearly bad for them, but they don't believe 100% in the gaslighting, get real.
What helps is that there are signs of this sort of thing, if you know what to look for. E.g you should prefer places where you can see into the kitchen (which is most of them these days), places where the customer service workers tuck in their shirts, and places that keep their bathrooms and parking lots clean. Places where police and EMS folks eat really tend to be good bets (they usually also get a discount, but lots of places offer such discounts).