They used to be given to staffs or donated. I used to work in a Casino as a croupier for 30 months. Our staff dining area occasionally get special desserts that were for events but unconsumed. Most of the staffs appreciate it.
But as people become more and more anal about free food and companies doesn't want liabilities, they are thrown into trash. Not my company because we have a massive staff number, surely some will appreciate it.
There was a documentary a few years back, for my country, where EXTREME low income people are complaining they receive the same few free food from donation foundation every time. The foundation then encourage people donate more variety instead of just instants noodles, canned sardines and rice. While watching it, I was smh so bad I almost broke my neck. In my mind, fuk them. If you want nice quality food, how about you work for it? Obviously barring people that are physically/medically unable to work. Beggars can't be choosers man.