If they did not have preservatives the sell by dates would be 3-4 days instead of 3-4 months from the production date. As you obviously live in an environment where all your food is canned or frozen or packaged in some way it might come as shock for you to know that real food is only safe to eat for one day (or less) after cooking if it is not refridgerated, frozen,canned, or has preservattives 4added.
The dates indicate when the protective powers of these preservatives wear off.
Preservatives work in many ways to reduce the possibilities of bacterial infection --after-- processing/manufacturing or after they leave the factory. Therefore, to ensure safe consumption, they have a sel --before-- date where outlets and buying consumers are suppose to be wary off.
Certain canned foods can last for as long as a year. Food packaging is getting more and more sophisticated and advanced to cater to the demands of the overpopulated Earth. Many lack the luxury of being able to eat food that are fresh enough to come straight from the farm.