This is an example of analogous structures, they've evolved it independently. Even though they have similarities, still the evolution and purpose of the hair loss is different and independent, also they do not share a common ancestor, which makes it an example of an analogous structures. Another good example of this structures are the wings of the birds and the insects, they do not share a common ancestor, but they have both developed wings for flying.