The answer to this question depends on the type of food.
One example is a drink product that claims to have Vitamin C in it. The manufacturer of this drink has to put an extra amount of that vitamin in the product because some of the vitamins will deteriorate over a period of time. This depends on the temperature of the storage of the product. The higher the temperature or the longer the storage time, the more of the vitamin will end up deteriorating.
Vitamin C happens to be one of the most sensitive vitamins. If the product is to contain 100% of vitamin C at the end of the shelf life, then the manufacturer may have to put in 200% to begin with because they know that 2 years later it will have lost half of its value.
Fats can also oxidize. If you have ever had a bag of cake flour on your shelf in your kitchen and two or three years later it is full of weevils and you smell it and it has an awful smell, it is usually because the fat that is present in the flour has oxidized.
The moral of the story, it is always best to use your food in a timely manner and check expiration dates to make sure to get the most nutritional value from it.