Girls, like people of all genders, are born with hair follicles all over their bodies. These follicles produce hair on the scalp, face, and body.
So, to answer your question directly: Girls get hair because their bodies naturally grow it from hair follicles.