Chlorphenesin is used in cosmetics as a preservative and antimicrobial agent to prevent the growth of bacteria and fungi, ensuring product stability and safety for consumers. It helps extend the shelf life of cosmetic formulations by inhibiting the growth of microorganisms that could cause contamination or spoilage.