Yes, sometimes it is fake, but very often it's a case of being unable to imagine a culture where genuine friendliness toward strangers is a lot more common than what they themselves tend to feel toward strangers.
I say, the cheek of it...
Depending on where you've visited, this may have little to do with the restaurant setting, and everything to do with the local culture. There are some regions in America in which engaging with others at that level of familiarity is expected in any context, and being impersonal and excessively "professional" is considered rude.
Perhaps you're immune to the effect, since you know about it. But in aggregate, it can change the disposition of customers (measured using the metric of increased tips).
They wouldn't do it if it didn't work.
As a Brit when in America I find it awful how the waitress will pretend to be friendly. If we're just a group of guys or whatever I don't want you to be pretended to be interested in who we are, what we do. Putting a hand on my back isn't going to make me prefer the food I'm here for. If I wanted someone to pretend to be my friend, I'd be in a titty bar.
I think there is a good middle ground, in the UK tips are expected to be about 12.5% max. All staff share them, and front of house aren't so transparent in trying to get a bigger tip from you. People appear to take pride in what they do, rather than just being mercenary.