The primary function of preservatives is to inhibit the growth of bacteria, molds, and yeasts. They achieve this by creating an environment that is hostile to microorganisms or by directly interfering with their cellular functions. Some preservatives, like antioxidants, work by protecting food from oxidation, which can cause rancidity and loss of nutritional value.