I think the question is why the impurity states, more often than not, reside in the gap.
I remember having to do an estimate in a Solid State Physics class of the "typical" energy difference between say, the donor and conduction levels with a group V donor (assuming low enough doping that donor atoms didn't "see" each other, which is typically the case), treating the extra electron of the donor atom as the electron in a Bohr atom in a background with the macroscopic dielectric constant of the semiconductor, and with the effective mass typical of that semiconductor.
The contribution from the effective mass and dielectric goes like m^*/m_0\epsilon_r^2 . These two contributions reduce the ground state energy of the "extra electron" by roughly 2 to 4 orders of magnitude (in Si, the dielectric constant is about 12 but the electron effective mass is close to the rest mass in vacuum; other semiconductors have much smaller effective masses) smaller than the H-atom ground state energy of -13.6eV. Typical bandgaps are a couple eV, so a level at about -10meV is going to lie just below the conduction band edge (i.e., it only takes about 10 meV to loosen the extra electron from its weak binding to the donor atom).
PS: This above description was for a donor impurity. A similar calculation can be done for an acceptor, using the hole effective mass instead of the electron effective mass. In Si, since the hole effective mass is about half the electron effective mass, I wouldn't be surprised if acceptor levels (from say Al, Ga) were closer to the band edge than corresponding donor levels (P, As respectively). I haven't looked up the numbers, so I'm not sure if this is true...but already we're stretching the predictive capability of a very simplistic model.