In short, by the community. The community fridge near me is refilled mostly by:
People who have to buy more than they want (ie pack of four items, but only need two).
People who made to much food/leftovers, or who just want to cook for others
Weekly community cooking event.
Overproduction from community gardens.
Spillage from restaurants.
Spillage from the grocery store.