There are more places to shop for food items, you can choose not to buy.
That isn't quite as easy with housing and gas.
As you are aware food prices are rising and rising, partly due to a more unpredictable climate and greater pressures on farmland worldwide to feed an increasing population, in particular an increasing middle class population in the developing/developed world. More people now desiring and can afford the same products.
Big supermarkets will sell some products as loss leaders to make consumers spend more. And people are pushed for time and options, it's much easier to get what you need in one big shop, or online order, so once the supermarket has you through the door you will spend.
Housing and gas doesn't have to play these games. House costs are supply and demand, if half the population up and left tomorrow with empty properties down each street it would be a scramble to sell if you needed to.
And gas priced on the open markets, how much tax the Government and profit the private companies want to add is what our leaders in charge calculate. We have a nation that tries to make sure we don't have homeless hungry children on the streets. A government needs money to do this. We also have a funded health service.
You can't have it all, you have to pay for something somewhere along the lines.
And of course it's more complicated than this obviously.