I live in NJ with no nearby refineries. My colleague in Houston, where there are many refineries, pays 30 cents more per gallon.Thank-you. I live in a town with two major oil refineries and one small specialty refinery and even the people in the lab doing quality control refer to themselves as "petroleum engineers".
You would think we would have some of the cheapest gas in the state but it seems to get less expensive the more distant you go from the refineries. Go figure! Even the petroleum engineers I know can't explain this odd fact to me (nor do they try to pretend they understand it).
It is a matter of demand, supply, taxation, production costs, logistics, and politics. In a state where there is no state income tax, they must get their money from somewhere, so fuel is a lot more expensive than in other states, due to taxation. A very efficient refinery can make fuel cheaper that a very old inefficient refinery can, another factor. And there are many, many more. It is very complex.