I think what really kicked this off is that restaurants started putting surcharges on bills by directly passes specific legal requirement costs directly to the customers without increasing their menu prices. For example, now that servers get some health benefits in SF, they'll have a surcharge that says something like "SF Mandate" or "SF Health Surcharge".
This would also cover stuff like to go order surcharges where some places are charging more for takeout sort of like Doordash or Grubhub do, except of course, you're picking it up yourself.
I do wonder how/if places with some more traditional surcharges are going to comply now. For example pizza places charging delivery fees.
Places will still be able to get away with "X% gratuity added to bill for Y seats (though I've seen some places do it for any number of people, including 1)" because that's optional, even if they put it on your bill because you've always been able to make them remove it.
It is like on most people's cell phone bills in the US. You'll see stuff like "FCC surcharge" which is the company passing their FCC regulatory fees directly to the customer without changing their advertised prices for a plan, E911 fees for 911 services, various taxes levied on the company but not the consumer are also passed to the customer.
The purpose is to have restaurants take these fees/taxes/whatever and make them build those costs of doing business directly into their advertised pricing on their menus. Companies don't like this because they can advertise cheaper prices and psychologically the customer doesn't usually think or even know about the extra surcharges, companies can set those surprise charges to whatever they want (they aren't regulated) and they do not have to really compete with those prices wherever they advertise (menus, flyers, etc.) thus driving them down for the consumer.
McDonalds gross profits are $14.68B over the last 12 months with over 9% year-over-year growth.
They aren't struggling and other than covid (which just held steady for a few years at $10B), the trend has been going up, not down, not stagnant for many years.
Remember that's gross profits. If wages were hitting them hard, then we'd see the trend decrease but that isn't what happened or is happening.