That kind of reasoning only works when all the things you need add up to roughly all the money you have. Otherwise, the rich person will say, "fuck it, I'll take 5", while countless of poor people won't be able to afford any.
If we're that concerned about the poor people, then maybe our laws should rather ignore price gauging and instead focus on implementing government-run distribution and storage centers for the inevitable emergency so that everyone can get their basic supplies. I can buy the argument that we don't like the way that a free market would solve this problem. But then we have to actually put down something reasonably-likely to work in its stead. Right now we have neither (whilst the poor suffer), and we're blaming the side that's saying "leave it alone, the market can kinda fix it".
So with anti-price-gouging laws, we're making a bet that rich people are more constrained by the ability to use certain items than they are constrained by money. That is, if they can't buy up the supply and resell it at absurd prices, they have no reason to buy more than they truly need, so the goods remain available to more people in need, at lower price.
I do like the idea of government-run emergency stockpiles, and rationed distribution of those. But then, I have a feeling that people who want price gouging to be allowed are also the people who, in times of calm, complain about government being fat, and demand the emergency stockpiles to be cut down.