Hoarding is a term often used to name such behavior:
Hoarding or caching is a general term for a behavior that leads people or animals to accumulate food or other items in anticipation of future need or scarcity. [...] Civil unrest or natural disaster may lead people to hoard foodstuffs, water, gasoline, and other essentials which they believe, rightly or wrongly, will soon be in short supply. [...] Rumors surrounding [Japan’s] worst earthquake and nuclear disaster have resulted in hoarding of rice [...]
Aside: In the UK but not in the US, hoarding or hoardings are used as nouns meaning (1) "temporary fence-like structure built around building work" and (3) "A billboard", so for the purposes of this answer just ignore those two meanings, and also meaning (2), "roofed wooden shield placed over the battlements of a castle and projecting from them", as excellently illustrated by reconstructed hoardings at Carcassonne, France.
If you seek a term less-specific than hoarding but more-specific than sociology (which as mentioned is study of behaviour) also consider survivalism:
Survivalism is a movement of [people] preparing for future possible disruptions in local, regional, national, or international social or political order. Survivalists often prepare for ... anticipated disruption by having emergency medical training, stockpiling food and water, preparing for self-defense and self-sufficiency, and/or building structures that will help them survive [...] natural disasters, patterns of apocalyptic planetary crises, [...] tornadoes, hurricanes, earthquakes, blizzards, severe thunderstorms, [...] chemical spills, release of radioactive materials, nuclear or conventional war, oppressive governments, general collapse of society [etc.]