Right, but that's not due to what the chain wanted to do, but due to liability. Allow people to waive liability claims for past-due food, and this problem mostly goes away.
I remember working in a produce warehouse, and due to some clever particularities of our non-profit status, we were allowed to give away surplus produce to employees with no liability. I don't think we ever threw out anything except old bananas; it all got taken home.