The USA only does this for trivial unnecessary frivolities like medical care.
That physical separation is maintained by the actual physical class separation along policed municipal boundaries that exists in the US.
Developing societies instead use walls with barbed wire and hired security for that function.
That said, there are pretty strong correlations between the tier of the grocery store and the appearance of their average customer.
And yes, there are wealthier but frugal people who shop at cheaper stores, but they are an exception.
This happened to us in multiple cities (NY/Miami/SF)
That's true of my friends and romantic partners of all races by the way. I can't think of a single time I've seen someone be given a racial discount here.
There were a few times at restaurants and grocery stores where they had access to items I wouldn't have, but that almost always came from speaking the right language and knowing what to ask for. I'm sure those places would have been equally happy to accommodate me if I know what to say.
I do have stories of those friends and romantic partners being discriminated against a few times.
There are rich areas and poor areas, touristy areas and off-the-beaten-path areas. But in US retail you won't find sellers discriminate based solely on the look of the customer in 99% of cases.