The primary function of holocrine secretion is to provide lubrication and protection for the skin and hair. Sebum produced by sebaceous glands helps to maintain the moisture balance of the skin, preventing dryness and cracking. Additionally, it has antimicrobial properties that help to protect the skin from infections.