There will always be a group who can't afford the needed goods and will rely on charity. You want that group to be as small as possible so charity can cover it. Without price hikes people buy more than they need making this group bigger. With price hikes the needed goods are better distributed because people just buy what they need.
Price hikes also create incentives to get more goods to the hard to reach effected area. With price hikes being legal you will also add competition that makes the hikes not so high. You will also see legitimate stores offer credits after the situation is over. Its all about incentive to bring in more needed goods and evenly distributing the goods already there leading up to the crisis.
Im happy to answer any questions on this subject.
- Fyi, Walmart sign is a fake sign i made just as an example.