Here’s an analogy that suggests why there is a difference. A tuning fork emits
sound waves of a single definite frequency (a pure tone) when struck. But if you
tightly pack a suitcase full of tuning forks and then shake the suitcase, the proximity
of the tuning forks to each other affects the sound that they produce. What
you hear is mostly noise, which is sound with a continuous distribution of all frequencies.
In the same manner, isolated atoms in a gas emit light of certain distinct
frequencies when excited, but if the same atoms are crowded together in a solid
or liquid they produce a continuous spectrum of light