I have known for a LONG time that a lot of the expiration dates are bogus.
It simply forces the consumer to re-buy food that is actually still good.
My daughters went on an expiration-pitching orgy a few months ago - and a lot of our stash vanished overnight. It wasn’t a game-ender, but it hurt the effort...
When I began prepping, there were no expiration dates required on grocery food, so, I called the companies myself and asked about how long their food was good in the can/box, etc., and under what conditions that would require. Two companies I made sure to call was Hellman's Mayo company about their Mayo and Hormel about all their canned meat including Spam.
For all cans, my rule is, if the can has bulged at the top or anywhere else, toss it or if the can has a hole (never found one), toss it. Out of caution, I choose cans that haven't been bent.
I store packages of pasta in the fridge in order to know it's okay from elements that lower shelf life, but without refrigeration, if stored in the dark without much humidity, and away from pests, it lasts almost forever.