That can't be right? Canned foods last a long time. MREs do as well. Pasta/Rice?
The problem is not finding food that is still edible after years in storage, but food that the crew can eat long term without getting sick and without developing deficiency diseases. For example, the Pentagon says you can't eat MREs for longer than 21 consecutive days.
The space food problem is genuinely hard and interesting, you can get a sense of it in this paper: https://www.sciencedirect.com/science/article/pii/S221455242...