We've grown *very* complacent and soft as a society. Almost no one knows what it is like to go without luxuries that weren't available to kings from years past. The peasants of those times had it much harder.
Long-term storage of dried rice and beans can keep them for 25 years. Oxygen, light and pests (mice/insects/etc) are the enemies of long-term storage. Mormans (LDS) are experts at this. Plastic bags are fine for buying from the store, but achieve none of those long-term protection functions.
If you are serious about such long-term storage, there are plenty of YouTube videos about how to store using O2 absorbers, mylar bags and 5 gallon buckets. Here is a good one: