Food eventually "goes bad": it becomes rotten, stale, or rancid. It's not safe to eat after a certain period of time. You can talk about that time period by saying that the food "will keep for ___":
A jar of honey will keep for decades if it remains sealed.
It will keep in the freezer for a couple of months.