A life saving piece of food for $50 sounds like a bargain. Depends on how you look at it. But your example is silly. That never happens. People just won't jack up food prices for an individual who looks hungry.
But take a more realistic, similar example. A hurricane hits, knocking out power for weeks. A grocer has a limited supply of canned goods. He can sell them at regular price to the first group of people who visit his store, knowing that many of those customers don't really need the food - they are just buying to stock up. Meanwhile, people who have no food left visit the store later and find all the food has been sold. OR the grocer can double his prices, thus dissuading people from buying food that don't really need it, and allowing those that really really need it to buy it later.
Many people seem to think there is one "fair" price for everything. But that isn't true. Prices depend on each individual buyer and sellers unique situation and circumstance.