Evolutionary selection pressure for human hair patterns?
At least some of it is a side effect of the way human skin develops. Humans actually have the same number and density of hair follicles as great apes, it is merely that our hair develops as short vellum hair rather than the thicker, longer hair of great apes. This is a side effect of the same genes that control eccrine sweat gland development, turning on the genes causes the skin to develop more sweat glands at the cost of reducing hair thickness across the body. For humans, a primarily tropical species, having sweat glands was evolutionarily more useful than being hairy, so we largely traded hair for sweat glands. As a result, the distribution of hair across our bodied may be at least in part a side effect of where it would be most useful to have sweat glands. Hair is typically retained in the armpits and groin because it helps trap odors that may elicit sexual signalling.
Hormones may also play a role. Testosterone has been linked to changes in hair development, and may actually be related to male-pattern baldness.