When the pandemic hit, these were the same items people hoarded (in addition to toilet paper). Why? The pandemic wasn’t going to shut off a fridge/freezer. It wasn’t going to disable the water system. People reacted in the only way they knew for a crisis they experience often — not what the actual situation was.
It served as a reminder that when a major, acute crisis hits, most people are not going to be thinking rationally. They’re going to rely on whatever instincts have been developed.
I can’t even imagine what extremes would result from a fast-moving crisis like a nuclear explosion.