Well, I assume the expirations are like expirations on human food- food is actually good for a while after that, but they won't guarantee it after that date. However, if you open the food and it's wet (assuming we're talking about dry), or it's moldy or it smells off to you, I'd take it back. In a plastic container it should stay good for a long time.
ETA: I'm on my second big (I think its 26lbs) bag of Wellness Core since getting Kabota on December 11th. He only eats about 1.5C per day. I'm halfway through the bag, and I think I opened it about a month ago, and it's fine. I've been resealing the ziploc that comes with the bag.
It is best to leave the food in the original wrapping inside a sealed container. My understanding is the fat on the kibble can cause some sort of reaction with the plastic plus some kibbles are flushed with nitrogen before the bag is sealed to keep out oxygen that causes fats to degrade. Pouring the kibble into another container releases the nitrogen and introduces oxygen to the kibble. Always good to have the original packing in case of recall or other issues anyway of course.
Give a newly opened bag a good long sniff and compare to the old bag's contents, should smell about the same. I don't much care for the smell of kibble but some can tell the difference between fresh fat and rancid fat. As well as damp and mold look for mites and moths. We had one poster here that claimed all kibble is contaminated by storage mites but didn't provide any evidence. Hope she was an alarmist and it isn't so.
i have actually wondered this myself. i keep mine in a DF container that i bought at petsmart a long time ago. it holds a 40lb bag but i dont buy 'that' kind of food anymore & since i only have one dog now that only eats about 2 cups a day. the food still smells fresh & she still readily eats it.
for canned food i have a special ploastic tupperware container that i keep it in the fridge in.