Price gouging is an important component of the market to ensure that a run on supply doesn’t deplete supplies, leaving it in the hands of the first few people who happen to run to the store. It ensures that supply exists as long as possible so people can still get what they need.
Sure it sucks that stuff is so expensive, but when something is in high demand and short supply it’s only fair that it’s expensive because it’s valuable.
Stuff being expensive sucks but it sucks less than there not being any at all so you literally can’t get what you need even if you were willing to pay an arm and a leg for it.
Plus when prices gouge, it incentivizes increased production to alleviate the supply shortage. Without the higher prices, there’s no signal up the supply chain so the shortage lasts longer.