Sorbic acid is commonly used in cosmetic formulations as a preservative to prevent the growth of mold, yeast, and fungi. It helps extend the shelf life of skincare and haircare products by inhibiting the growth of microorganisms, making the products safe for use.