Frozen food that is not stored in the fridge or freezer will go bad earlier, for example. Shelf life is linked to food quality, expiration date to food safety.
Most of these labels do not guarantee the safety of food. A product that has passed its shelf life might still be safe, but quality is no longer guaranteed.
Shelf life is most influenced by several factors: exposure to light and heat, transmission of gases (including humidity), mechanical stresses, and contamination by things such as micro-organisms.
This is important, as stores can be fined for selling out of date products.
Most shops, if not all, will have to mark such products down as wasted, leading to a loss of profit.
In most food stores, shelf life is controlled by using stock rotation.
This means moving products with the earliest sell by date to the front of the shelf, so that most shoppers will pick them up first and so getting them out of the store.
Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! Use prior to the listed date does not necessarily guarantee the safety of a food or drug.