That is why you have loss leader grocers, where they pull people with dramatic discounts on specific items, but the total cart costs the same
Some consumers go to specific stores to purchase specific qualities of brands.
But most do not, especially for convenience products. You get it where you can.
Economic viability isn't what led to "wide availability and inventory". No, it's imperialism. It's exploitation of the Global South. It's paying slave wages through subsidiaries in West Africa to cocoa farmers while making sure those countries stay poor, for example.
We also wage economic war on our our anointed enemies like Cuba and then use the inevitable result of that economic warfare as a reason why our system is good.