Genetics. There’s no cosmic reason someone goes one way or the other, like any genetic trait it either expresses itself or it doesn’t. Evolution isn’t a perfect or uniform process. To ask why one might lose their hair when others don’t is a bit like asking why one person is tall and another is short; there is no existential reason for it, it just is the culmination of aeons of random interactions leading to a code that creates a result. Unfortunately, that’s just the way things are.
Perhaps evolution, unarrested, would eliminate hair loss from our DNA, but with the death of pure natural selection it’s unlikely to occur. So long as the lack of hair doesn’t preclude reproduction, it’s not going to be targeted naturally. If anything there’s a comfort in that; losing their hair didn’t stop your ancestors and it won’t stop you.