It isn't like anyone would be unable to afford food, because a welfare state would imply a standing agreement to buy everyone food at the taxpayer's expense if required. And it is entirely reasonable for prices to go up when there is a shortage, the people who built up stockpiles in advance need to be compensated for their foresight. Someone has to be stockpiling food.