so, stop asking "why did we evolve to grow hair?". that is the wrong question, in every possible context.
the right question is always "why do we have less hair than our recent ancestors?".
and, in the context of sexual dimorphism, what we need to understand is why men are losing their hair at a slower rate than women are.