Not to mention destructive hysterical hoarding. There is someone in this thread who noticed an extreme shortage in webcams so when only two were left in a shop, he bought both.
Which means resources needed at this instant are instead sitting idle, at best awaiting higher prices at some arbitrary future date. And earnings, rather than going to producers, are wasted on pointlessly destructive arbitrage. So in crisis, the market has led us into a soviet style toilet paper shortages for no reason. Not to mention far more important critical supplies.
I can't know what was said in your classes. Assuming no control on prices in a crisis, did they say how holding a large stockpile of a rarely needed item for the long term with it's associated storage cost and risk is in some way more profitable than simply cornering the local market on the commodity at the time it is needed and indeed helping those prices rise rather than fall? In honesty, that may be a hidden assumption against price gouging more than an ideal market example used in a classroom.
At any rate, few if any mainstream economists suggests that sudden monopolization of emergency commodities that are needed immediately but briefly during a crisis would be remotely a good thing. It is more a Cato institute / libertarian position driven by ideology rather than real world data and history which consistently refute it. It is also why no sane society allows it in emergencies on crucial goods.
As if to prove the point, the theory has just been tested yet again: there are no world wide government price caps on toilet paper and yet there is an enduring shortage at the moment.
If interested in this, here is a Nobel prize winning economist writing right now on the issue:
[1]: https://en.wikipedia.org/wiki/Price_controls#Criticism
[2]: https://en.wikipedia.org/wiki/Price_gouging#Opposition_to_la...