Because dark line spectra result from passing white light through ionized gasses and plasmas, which is what the atmosphere of stars are made of. These frequencies are scattered by the star's atmosphere as it leaves the surface (photosphere) of the star, and don't make it to earth.