i have a buddy that'll eat a half eaten donut or hot dog out of the city trash while out and about. he gets sick every so often but accepts diarrhea as completely normal, like less affluent areas of the world.
i probably wouldn't trust food, just because *how* food is stored is just as important as any seals/expiration dates/containers. but, like my buddy, some people either accept the risks, or are blissfully ignorant. one of the greatest moments in my youth was my buddies and i finding a full 24 pack of bud light behind a dumpster -- sure it was room temperature, and a little skunky, but it did the trick for us 13 year olds!
grocers do throw out a ton of food, though it's all about liability and contracts.