Dr. Lindsey - Excellent explanation.
It is in the genes 95% of the time- the hairs on the top of everyone's head are programmed to do what they do; either stay, or thin, change color, or atrophy and go away. Clearly, there are outside influences that change this like medical disorders such as thyroid problems, infections, traction alopecia - the list goes on. But, most of the time, it is in the genetic programming that people are born with.
In my own case, everyone in my family has thick hair, but my hair has gone down the path of male pattern baldness.
I hope this helps.