Here is a number that will rearrange how you see every gas station in America.
The gas is barely profitable.

Gif by NoCheeseRecords on Giphy
Not a little less profitable. Barely. On a gallon of fuel, a retailer might keep a few cents after credit card fees eat their share. Some days the card fee is larger than the profit on the sale.
Meanwhile the coffee costs almost nothing to make and sells for two dollars.
So what is the giant lit canopy out front actually for?
It is a sign. An enormous, expensive, brightly lit sign whose job is to get your car to leave the road.
Once your car stops, the real business begins. And in the Northeast, one company understood this earlier and more completely than almost anyone.
They built a sandwich shop, put a parking lot around it, and hung a fuel price on the street so you would pull in.
