You don't have to go that far to see this effect. Grocery stores in two different neighborhoods of the same city can have wildly different pricing for the exact same product. A lot of times both stores will be owned by the same company and their shelves will be stocked by the same truck.
In this case you are usually paying more for the privilege of grocery shopping in a safer neighborhood around people with whom you feel more comfortable. That sort of pricing discrimination exists for a lot of other stuff, for example gasoline.
Most big grocery stores chains would have socioeconomically modeled and geographically analyzed their customer bases, and are aware of how much people are willing to pay for this sort of convenience.
I usually pay more to shop at Target rather than Wal Mart precisely because being in Wal Mart is miserable for about a dozen different reasons. I swear, they've even done something to the lighting in their stores in the last few years to make it worse. It's weirdly grey and dingy. I don't remember them being like that even 15 years ago, and it's not just one location, it's like some memo came down from corporate instructing them to make their stores feel as much like being in a county free-clinic waiting room as possible.
It's because Walmart isn't trying to compete with Target as a "browse around" store. They are trying to compete with Amazon, only it's self-warehouse work as well as self-checkout.
They do in fact purposefully keep their stores dingier then what the average big box store is.
To reassure value shoppers that a minimum percentage of the purchase price is going towards the facilities, thus making it self-evident that they are getting the best possible deal.
Whereas a better maintained store by definition cannot offer a lower price and still be profitable.
You don’t even have to go to different grocery stores. The same grocery store will use coupons to sell the same product at different prices to different people at different times.
The loyalty discount cards enabled them to mail you coupons specific to your purchasing habits, but the proliferation of apps has even further refined it to be on a day to day or even hour to hour basis with push notifications of coupons just for you in your app.