Some of the wavelengths of light that are emitted from the sun will be absorbed by atoms in the outer layer of the sun and also the atmosphere of the sun, and we see this as absorption lines in the spectrum. Now, this absorbed radiation will indeed be re-emitted again, so one might think that these emission lines should "cancel out" the absorption lines. The usual explanation for why this doesn't happen is that the re-emitted light is radiated in all directions, not just towards us, meaning that to us these wavelengths will be much fainter than the other wavelengths.
But the problem I have is that this happens all around the sun (since the atmosphere is completely surrounding it), and intuitively it seems then that all of this re-emitted light should combine such that far away it would appear that the sun is radiating these wavelengths just the same as it is radiating all the other wavelengths. And if that is true, then we shouldn't see absorption lines in the spectrum.
So what is it that I am missing?