>>11238739Hair evolved from sebaceous glands.
Their initial purpose was to wick moisture to the surface, warmth was a byproduct that allowed mammals to occupy colder niches at higher latitudes. Its main purpose was to keep the skin moist. We know this because Echidnas have the primitive feature of hair that wicks milk to their fur surface to their young.
I got an A in Mammalogy this fall btw.