system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Can anyone explain why we have foods that start out on the shelf but than have to be refrigerated so they won't go bad?

Foods like: 
Ranch 
Mayo
Ketchup
Etc..
gpt
Most foods with "refrigerate after opening" have been vacuum-sealed or canned in order to kill off harmful bacteria, or heated and the package filled with nitrogen (or inert gas) in the case of dry foods.

As soon as the container or package is unsealed, it's exposed to oxygen and all the dirt, spores and bacteria contained in our atmosphere once more, and so the decay, fouling, molding and/or other such degeneration processes start back up immediately. At that point, you put it in the fridge or things like mayonnaise will do what they do best; go completely rancid overnight.

Effectively, the packaging techniques allow us to temporarily pause the food's expiration, until we've opened it.