Pricing (which includes 'gouging') is not perfect, but it's better than central planning, price fixing, and quotas at efficient allocation of resources. At the very least it provides a 'wisdom of the crowds' affect where anyone with enough money can reallocate some of the resources to a location of need that might lack visibility to the hand full of people that would hypothetically be centrally planning all the resource allocation.
I just wanted to clarify that when you said higher prices discourage those with lower needs, what you really meant is that it discourages those with lower means-weighted-needs. Which is to say, it discourages the desperate-but-poor, rebalancing demand toward the less-desperate-but-more-wealthy.
Pricing spreads the capability of resource allocation around. In the central planning model the poor desperate person is reliant on a tiny group of central planners to allocate them some resources, and the central planners may not see that particular poor/desperate group. With the pricing model, anyone with the means can allocate resources where they see a need. In both scenarios the poor are reliant on someone else to allocate them resources. In the pricing model, the poor person has a better chance of being seen by at least someone with the means to make it happen.
https://www.amazon.com/Basic-Economics-Fifth-Common-Economy/...
Others with lower means, you meant?