Why do shops sometimes end up with empty shelves/out of stock? According to the law of supply and demand, if the demand got so high that the shop would go out of stock the seller would just raise the price so that the shelves are always almost filled, right?
Yet we saw, especially in the beginning of the coronavirus pandemic here, that if you went in the supermarket the shelves were often almost empty for certain products. The prices also got higher, but apparently not enough to keep the shelves to the capacity in which they were before.
Why does this happen? I understand a seller having unsold stock, since they may have wrongly thought that the respective product will sell well or accidentally bought too much etc. but getting out of stock? They can just raise prices. What are common reasons that certain sellers (e.g. supermarkets) might not raise prices when the demand gets out of hand? Wanting to keep their reputation of having stable prices to keep their customers long-term? Not being able to find someone to sell them the respective product (the market overall not being able to keep up with the demand)? Laziness/the seller's incompetence? All of the above + more?