They are probably afraid of liability issues if a store donates moldy or half eaten food.
I've volunteered in food banks too like thefool above. These places can get shitloads of donated food and supplies from stores and corporations. Problem is they are skewed to certain stuff. They try to feed people with balanced diets, but they will struggle with getting meat and dairy products since they spoil fast or dont have a lot of refrigeration room. But then get too much bread which every store and bakery wants to get rid of fast. But bread spoils fast too.
Food banks will try to organize stuff in prepacked boxes or bags, so dry goods are best. It's tough to pre-assemble stuff if you need to include cold storage products, or have runners go back and forth to add it to a box for each person wanting to pick up a donation box. Dry goods can last a year or two. Fresh food wont.
Also, you can get donations that are simply rotten (more often from individuals dropping off crap they had in their back shelf for two years). Most people will see it and trash it. But for people who may be down and out or not thinking straight, there is risk they just eat it and get sick.
That's I'd guess what those jurisdictions want to avoid.