Yes that’s how it works. You save some money and spend it in other shit.
Also I don’t have a car just so I can go get groceries. I have a car for a multitude of other reasons and I can get groceries. Driving 5 mins to a supermarket has an insignificant cost, and if that supermarket is cheaper then you can save multiples of that.
Regarding the stuff expiring, that’s just your experience. I have the opposite. There’s plenty of non perishable shit that I can get when it’s on sale because I can carry a ton of it if I came by car. Meanwhile if I go shopping by foot and I need laundry detergent I’ll just have to get whatever they have at that time. You can save a ton of money like that.
For easily perishable food yes buying regularly is better but that also means a ton of wasted time going to the supermarket very frequently even if to get only a few items.
That isn’t there so people use it. That is there so that Facebook can track where you go