They just get rid of it afterwards anyway. It doesn't hurt them to give food to the needy, so why not? It's only the right, human thing to do. There really isn't a single reason not to. Even if for some unexplained reason, it does damage the company slightly, they're still obliged, as human, to help those who are in need.
We waste so much food while so many people go hungry. That food we just throw out could be a meal for someone. I think that should apply to restaurants too, most specifically the fast food ones that have a lot of leftover food at the end of their day. We should be giving the needy this food because it would help them out a lot and we wouldn't be wasting anything.
Yes, it is ethical to require supermarkets to give unsold food to the needy. As long as the government is not confiscating items off of store shelves before they have a change to sell, there is nothing wrong with donating unsold items to those in need. Many supermarkets just throw away food items they don't sell. It is much more ethical for grocery stores to donate unsold food to the needy, instead of disposing of it.
I know numerous supermarkets that give their unsold food to the needy through reputable community organizations. However, I absolutely do not believe that this should be a requirement. You cannot legislate generosity. A supermarket is a private business, and they should be able to do whatever they want with their goods.
While it may be ethical, it is not right to require supermarkets to give unsold food to the needy. It is a good idea to put unsold food to good use. Many stores do this already and it is helpful to everyone. However, in our free-market society, private business owners have a right to make their own decisions about how they operate. They should not be required to participate in this type of program. Perhaps it would be better to publicize the names of businesses that don't participate. Public opinion might be more persuasive.