Gas stations don't make much money on actually selling gas - consumers are irrationally price sensitive when it comes to the price of gasoline, so the stations are generally selling it at or near cost.
As long as people still pop into the convenience store to get a soda and a candy bar, it doesn't matter if they're filling your tank with gasoline or charging your battery.
I'm thinking gas stations will stop selling garbage and start selling actual food, since charging takes longer and people will be hanging around for a little while.
There are likely other factors at play. For example, if the more expensive fuel station has brand associations it triggers (e.g. Shell [1]), the higher pricing likely benefits them more so than it hurts, as their target market discerning customer is likely to interpret the price as a proxy for quality.
Can you provide a concrete example? I can't recall ever seeing such a disparity in the US having lived in the midwest, northwest, and east coast. Perhaps you're in a different location?
The Burlingame A&A is notorious for being the one of the cheapest -- if not the cheapest -- places to fill up between SF and SV. In this case, it's likely that the Chevron literally across the street just decided it's not worth playing that game, hoping instead to appeal to the crowd who wonders if the cheap competitor is actually up to par.
The fact that the Chevron gets any business at all seems to validate this strategy at first blush.
Also the Chevron at grant and el Camino is $3 when the shell a block away on grant is $3.60 or so. The Chevron is one of the highest trafficked gas stations in SV and operates on volume. The shell can't play that game so charges a pronoun to grocery shoppers.
Costco is 20% cheaper than all other stations in Toronto. So either Costco is selling at a loss (unlikely) or there's plenty of profit in gas for gas stations.
Given that you have to pay an annual membership fee to get access to that gas, it's likely subsidized by the fee and used as a loss-leader to bring people to shop at Costco.
It's an older link, but they still do much the same. There have been court cases brought against them by consortiums of other gas stations here and there, but AFAIK Costco has emerged victorious so far.
As long as people still pop into the convenience store to get a soda and a candy bar, it doesn't matter if they're filling your tank with gasoline or charging your battery.