Consumer demand drives waste. We are splitting more and more into two groups; those who can afford to shop at grocery stores and those who cannot.
Those who can, still operate the same old American way as usual. Everything must be available all the time and all must look perfect.
This strongly affects stores that sell perishable items, which is why produce can be one of the best trashpicker scores.
It forces the stores to overstock, and to throw away anything with any cosmetic problems, in order to be competitive. This in turn creates a management problem for the stores, because at that point they are left with surplus inventory and no way to make money off of it. Space is at a premium, especially with the big chains with their high merchandise turnover, and even marking stuff down when it is about to reach its pull date requires staff to keep track of all of this and do the work involved, along with taking up space that could be used for a higher turnover, higher profit item.
Some stores will go the "good will" route and try to do something useful with the dead merch inventory, but it still is a management problem, and perishables especially are problematic.
This is a lot of why so many still just throw the overstock and less than cosmetically perfect items in the trash. Those who cannot afford to shop at grocery stores will learn quickly that it is a myth that everything in a trash bin is inedible or toxic. This in turn drives locking of trash bins. Store managers frequently will say this is for insurance purposes; this seems unlikely, since people who cannot afford to shop at grocery stores are unlikely to be able to afford attorneys for such litigation.
At the same time, store managers will at times pay their staff to do such as pour bleach upon the garbage, which argues even further against the "insurance" canard.
No, it's more along the lines of shoppers and staff being afraid of the trashpickers. As with homeless people, they are perceived as having crossed the line into "other," though many trashpickers are not homeless.
This really is a matter of castes, which is part of what happens when a country's middle class is being destroyed.
The lower castes get the leavings of the higher castes, and in some ways, getting them out of a container in the back of the store could well be the simplest way to manage this. But we can't do that because the higher castes don't want to be around the lower castes, so all of this effort must be made to either keep the leavings away from the clutches of the lower castes, or to ship them to special places where the lower castes are allowed to congregate and consume or otherwise acquire these goods.
Unfortunately, the longer it takes to get perishable items to people who need them but can't afford them, the more likely the perishable items will have meanwhile spoiled.
Meanwhile, not all trash bins are locked, not all states have outlawed trashpicking, and even where trashpicking is outlawed, it is not always enforced.
People worry about being poisoned via trashpicking food. Here are some things they worry about.
Exposure to pesticides
I guess this must be about people spraying trash bins with pesticides? Surely everyone knows that grocery stores fairly routinely treat their interior premises with pesticides. A trash bin that is swarming with honey bees doesn't seem like a bad bet in that department. Oddly, I see honey bees around trash bins much more than I do house or carrion flies. That is worth taking note of. I'm not quite sure what it means, though.
Exposure to household cleaners
I don't understand this one at all. We're supposed to worry if people clean their dumpsters?
Exposure to rodent droppings
Warehoused packaged goods are going to be exposed to rodent droppings in many cases. Exposed food in trash bins may well be too. However, rodent droppings aren't invisible, and if you're eating exposed food out of trash bins that has been there long enough for the rodents to get to it, you are pushing your luck anyway in many cases.
Also, what exactly are we supposed to catch from rodent droppings? Deer mice don't get into trash bins, I expect. House mice don't carry diseases we need to worry about. Rats carry plague, but are we going to get plague because a rat was near some food? Correct me if I'm wrong, but I don't think plague works that way.
Salmonella
This is legit, of course. If you trashpick exposed food, especially if it has meat or dairy in it, you really are taking your chances. One exception I've made is when I was dealing with a local grocery store that sells fried chicken, kept warm and ready to eat, and tosses the leftovers twice a day. If you hit the leftovers right after they are set (in a plastic-lined box) on top of the rest of the stuff in the trash bin, you're really not taking any great risk.
I still didn't eat it more than once, but I've known a number of people who did, and also even more who used it as pet food. If you do this, please take off the skin; that stuff has too much fat as it is. Better yet to boil it some and drain it while hot, so you can get more of the fat out of it. That's not good for your pets (not good for humans either, oddly enough).
Perishables Packaged in Plastic
If the store tosses the leftovers when they're about to hit their pull date, and on a regular manner, you can eat this stuff if you like it. The sliced fruit can be great for juicing, if you get a bunch at once, especially. As always with perishables; learn when the store does this so you can pounce ASAP. Deli food could get salmonella pretty quick. Don't eat that kind of thing if it's gotten up to room temperature.
Stuff in cans or jars
If there's nothing obviously wrong with it, and it has the potential to have botulism, I'd stay away from this, especially if there's a bunch of it. They're not supposed to trash it, it's supposed to go back on recall, but you never know.
However, stuff that's shopworn or where the label has gotten messed up, is a safer bet. Also individual items that are thusly worn, but still properly sealed and not out of date, are likely just being tossed for cosmetic reasons.
Produce
When I've trashpicked food I've mostly stuck with produce. A box of somewhat dried out peppers won't sell in the store, but they can be just fine for cooking with. Same thing with dinged stuff. Stay away from anything that's molding; that can easily go through the whole fruit and will quite possibly be toxic.
I've trashpicked produce that I've eaten without cooking it, but this is a little dicier, and you should wash it carefully...a light bleach solution wouldn't hurt (maybe a half teaspoon in a gallon of water will help to clean the external surface of a piece of fruit).
Dairy
Hard cheese can be interesting. A block of sealed sharp cheddar with a bit of mold on one end is worth scoring. Also I've found that sealed containers of yogurt will often be excellent for a bit after their pull dates. Make sure you get them when they are still cold though.
Soft cheese and other non-hard dairy is a lot dicier; I'd stay away from it.
Non-food items.
The best non-food items I've trashpicked from grocery stores are plastic buckets. If the store has a bakery, they may well buy icing and garlic butter in these. You'll have to clean the buckets (I scrape them out first before I waste a lot of soap on all that grease), but you can never have too many five gallon buckets.
Otherwise, some stores with florists will trash excellent flowers when they're overstocked; others pay their staff to chop them up so you can't have them, instead of doing something nice like donating them to the local battered women's shelter or homes for the elderly, etc.
Obligatory Caveats
I'm not encouraging anyone to break any laws or put their health at risk here, I'm just being realistic; people do trashpick, and have good reason to do so in some cases. I don't mean to imply there is no risk. The world is a dangerous place.
However, it's also possible (in some circumstances) to work out a relationship with the people who run the store, where they let you have the leavings. Some people are going to be better situated to do this than others. Anything that keeps this stuff from going to the landfill is progress.