system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: how does canning/preserving stop a substance from “aging?”

Is it mostly a matter of just depriving the contents of oxygen? Why does that work?
gpt
What destroys food is mainly microbes like bacteria

The goal of food preservation is to make that food as unpalatable to bacteria as possible.

Storing cooked food in vinegar (pickling) for example makes an environment that microbes can't survive in.

Sealed cans prevent bacteria from getting in, and the food inside is cooked and pasteurized to kill off any microbes inside.

Flour, rice, pasta, etc uses another technique which is drying. The water content of that food is so low that microbes can't survive.