But I personally think it's probably to resist cold and trauma.
I think this reason can be analyzed from the perspective of human evolution. The obvious point of human evolution from apes to humans now is the reduction of hair. Just like animals like cats and dogs we usually see, they don't need to wear clothes, because their hair plays an important role in keeping out the cold, regulating body temperature, preventing mosquito bites and parasitic infections.
Primitive humans originated in Africa in the equatorial tropical region. This area is very hot and the temperature is very high. In this case, the hair is redundant, and most of the hair on the human body gradually degenerates to get smooth skin, which is beneficial to the heat dissipation of the skin surface. Moreover, when chasing prey or fleeing, the resistance is also small, so it will also have certain advantages.
However, although hair loss has many benefits, it also faces many dangers. Skin without surface hair protection is very easy to be scratched by plants and animals, and inevitable bumps can also lead to injuries. Moreover, the bigger problem is that although it is more comfortable in hot weather, it can't resist the cold in cold weather, and it will be at a loss when facing many pests in nature.