Humans evolved in Africa, and Africans have curly hair, which is the ancestral condition for all humans. Some Africans migrated out of Africa 60,000 years ago, and these people were the ancestors of all non-Africans. Some of these migrants ended up in Australia and SE Asia and they still retain their curly hair because they live in hot climates. When the climate is hot the curly hair allows the head to cool efficiently since the curly hair allows air to be trapped between the hair and the scalp. The trapped air insulates the scalp from the hot air and the sun shining on the hair. Straight hair evolved in those migrants who ended up in Central Asia. Central Asia is cooler than Africa and the straight hair eliminates the air space between hair and the scalp, and prevents cold drafts from blowing past the scalp. African Americans often wear hoodies because they like to keep their head warm, by preventing wind blowing past their scalp. 40,000 years ago some Central Asians migrated west and they evolved into Europeans. Some went to India and there they mixed with darker skinned natives in north India. Some Central Asians migrated to northern China and there they evolved to be light-skinned, thin-lipped, much like the Europeans in some ways because of the ice age climate both the northern Chinese and Europeans found themselves in.
Curly hair is the result of an elliptical hair follicle. When hair grows out of an elliptical follicle, the hair shaft is not perfectly round, and some parts are thicker than others. That causes the hair to bend as it grows. Peope with straight hair have more rounded follicles. The northern Chinese have the roundest follicles, so their hair is straight. Europeans have round follicles but some have slightly more elliptical ones, so their hair may be more curly. Pubic and armpit hair function mostly to trap phermones that are released by glands in that area. The hair keeps the phermones around longer so as to attract the opposite sex.OTOH, when bacteria breaks down the phermone, the product that the bacteria excrete is smelly and is what we smell as body odor. Shaving the pubic hair and/or the armpit hair therefore may render a person less attractive to the opposite sex, although it may reduce body odor. LOL
We do not know why some people have straight hair on their head but curly hair in their pubic area. Perhaps it is a retained ancestral condition meaning they did not evolve after leaving Africa. Perhaps the pubic hair do not need to be straight to prevent cold drafts from cooling that area, if people have been wearing clothes since they started living in cold climates. If there is no selective pressure to evolve straight pubic hair then the ancestral condition can be retained without harming people who have that condition.