They are very strict about what donations they'll accept. Even what's left in a buffet at the end of the night can't be donated. There's too much risk of contamination and spoilage. With your leftover burger there's no way to be confident you've practiced appropriate food care (refrigeration; how long you've kept it) even if you never unwrapped the thing -- let alone the slice of pizza that you probably touched with your bare hands and for all anyone knows is harboring flu virus or strep.
You're right, the liabilities make it unrealistic. How about buying a little bit less food and either donating the money you'd save to an org like City Harvest or buying a sandwich for the next homeless guy you pass on the street?
As I understand it botulism is mostly a concern in canning. If you kill most of the bacteria but the botulism bacteria is hardy and survives and produces it for months in the can.
You won't get that from eating spoiled buffet or even garbage.
And I don't mean food banks or soup kitchens. I mean the second McDonald's burger I was too stuffed to eat, or even the 8th leftover slice of pizza (as good as it is cold, somebody else could probably benefit from it more).
The logistics and legal challenges are mind-boggling, but there has to be a way.