system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: why do canned foods have such a long shelf life?
gpt
The thing that makes most food go bad is small organisms - bacteria, fungus, etc - that manage to eat the food before we do.  When they eat the food, they grow, reproduce, and they produce waste, same as us.  So instead of eating tasty food, if you eat something that's gone bad, you're eating bacteria, fungus and waste.  Not good.

When we can food, we put it into a metal can and seal it off so that no air can get in or out, which means that nothing new can get into it.  But the problem we still have is whatever bad lifeforms were inside of the can when we filled it - if we leave them alone, they'll eat everything in the can and the food will go bad anyways.  But if we kill them, then our food can just sit around in the can for years without any little microbes eating it.

Usually, all we have to do is boil the can.  Toss it into hot water, and the heat will kill any unwanted organisms living in our food.  Since nothing new can get in, the food's basically inert unless the seal on the can is messed up.  Safe to eat for years, even without being reheated after opening.