Having managed a franchised Exxon station, I'll expand on that a little. As a franchise owner, the corporate office doesn't dictate your street prices to you. But they do require that you buy your gas from the corporate supplier, and they control the wholesale price you are charged. It's up to you how far you mark it up. But corporate can always charge you 10 cents a gallon more or less than the next store up the road, so they can manipulate your pricing in that regard.
A mom & pop station can buy their gas from any supplier they like, and can therefore shop for a better price. But the down side there is that you never know what additives (if any) those stations are using.
When you buy brand name gas, you at least know the additives will be consistent from station to station, week to week, etc.
The owner of my station was very old fashioned, and believed in beating the local competition on price at all times. He was actually a retired tanker truck driver for Chevron. There were times he'd sell 87 octane for a penny less than he paid, just to beat the station across the street. Most of the time, though, he made 2-3 cents per gallon on 87 (before expenses) and no more than 10-12 cents on 93 octane. (Higher octane gets a higher markup)
And 87 octane accounts for about 80-85% of all sales. So for the most part, the poor guy made about 3-5 cents per gallon, tops. Sell 10,000 gallons in a week, you make $3-500.00. Then you have to pay utilities, wages, insurance, etc. This is why all gas stations have either service bays or convenience stores attached- because that's where the money is. The gas is just there to get you to stop in the hopes you'll be tempted to buy a slushie or a pack of cigarettes, etc.