I had the thought that as far as the market "perceives", there are never shortages. Supply and demand vary continuously, and prices keep some number of products on the shelves, but not too many. In times where supply suddenly drops, prices suddenly rise, so that just as before, some people buy the product because it's worth the cost, and others don't buy it because it's not worth that much to them. Except for things of unlimited supply, prices are never so low that everyone who has any use for an item actually buys it in the quantity the could use it in, so supply is always a limiting factor in this regard, not just during so-called shortages. I guess what was interesting for me was that thinking in these terms changes the framing of so-called shortages. It bypasses the special-case thinking one might engage in when supply suddenly drops. "Oh, there's a shortage, we need to suspend the free market to deal with it!" No, wait, there's just a change in supply, and like before, there will be some limit on consumption, and the old mechanism of price will work just fine.
supply is always a limiting factor in this regard, not just during so-called shortages.
But during shortages supply may limit consumption below some catastrofic threshold (think food supply).
Shortages create a strong profit motive for entrepreneurs to step in and increase supply or make alternatives available. Therefore they cannot persist even in the short term, unless the market is hindered from doing so. This is assuming of course a context where the market is functioning.
Freedom of markets is positively correlated with the degree of evolution in any society...