This is, I will point out, the same reason "expired" or almost "expired" produce and groceries get destroyed or thrown away instead of donated. In almost all cases the food is still perfectly safe, and most stores assume (incorrectly) that they would be liable for any illness caused by "expired" food. But the optics would also look terrible because most people just don't realize that food doesn't magically go from perfectly safe to toxic the instant it does beyond the date written on the package. I have a friend who runs a homeless charity and she tried to get the (many) grocery stored to donate constantly. Almost all of the chains have corporate policy against it for liability reasons.