To add to what the other has said I highly suggest you read up on the history of expiration dates on food in the US. They don't mean the food has expired as in "the food is rotten". They usually only mean the food is "below the guaranteed quality standard of the company". Most food that goes past its expiration is still perfectly edible.
It's a marketing gimmick.
Plus, to the edit made being a cooler went out just because food has gotten somewhat warm doesn't mean it's gone bad. It all could still have been donated to a food bank or homeless shelter to feed people in need right now, thanks to good Samaritan protections, but companies would rather destroy it all and get the insurance to cover the shrink than to let the people eat without being able to profit off of it.
Everyone knows that one line from the Grapes of Wrath but I highly recommend reading the entire passage it comes from. It's very pertinent to this topic.