Calcium propionate is primarily used as a food preservative to inhibit mold growth in baked goods and extend shelf life.