The primary function of the labia majora is to protect the internal genital structures from physical damage, bacterial infections, and other external factors. They provide a barrier that helps maintain the internal genitalia's cleanliness and moisture balance.