I work returns in a Costco. In fact, I'm typing this on my phone in the little office we have in receiving.
Food either gets sold or gets pulled for various reasons. Pulled food goes first to the local food banks. What can't go to them goes to a farm, a local pet rescue group, and to a wildlife rescue and rehabilitation group.
Anything left over from all that goes into a bin to be turned into high grade compost, which gets sold for $5 for a 20lb bag.
It takes time and money to do this, and it gets done anyway because the will is there.


