There are all sorts of business models out there where one commodity has a much higher margin than another commodity.
Gasoline stations, for example. The stations don't get much profit from the fuel sales, but the confections are marked up 50% to 200%. That's what pays for the lights and wages.
Grocery stores often have "loss leaders", food items that they sell less for what they pay their suppliers. But a good price on milk or Coke brings customers to the store--and these customers usually buy other foods that have a reasonable profit margin.