Because both momentum and energy have to be conserved when the atom absorbs the photon.
Suppose we have an atom with a mass $m$ and the energy difference between the initial and final levels is $E$. The photon energy is $hf$, so conservation of energy gives us:
$$ hf = E + \tfrac12 m v^2 \tag{1} $$
where $v$ is the speed of the atom after absorbing the photon. However a photon also has a momentum $hf/c$ so conservation of momentum gives us:
$$ \frac{hf}{c} = mv \tag{2} $$
and combining equations (1) and (2) we find:
$$ E + \tfrac12 m v^2 = mvc $$
which gives us a quadratic for the final velocity of the atom:
$$ v^2 - 2vc + \frac{2E}{m} = 0 $$
or:
$$ v = c\left(1 \pm \sqrt{1 - 2E/mc^2} \right) $$
If we assume $E \ll m$ we can expand the square root using a binomial approximation to get:
$$ v = c\left(1 \pm \left(1 - \frac{E}{mc^2} \right) \right) $$
and we can ignore the solution greater than the speed of light since it's unphysical, so we end up with:
$$ v = c \frac{E}{mc^2} \tag{3} $$
(I've written it this way because $mc^2$ is the rest energy of the atom so the equation makes clear that the key factor is the ratio of the excitation energy to the rest energy.)
So there is one, and only one, possible velocity the atom can have after absorbing the photon. That's why the absorption line is sharp and not a continuum.
The velocity after absorbing the photon is generally negligibly small. For example consider a hydrogen atom absorbing the $10.2$ eV photon required for the $1s \to 2p$ transition. Using equation (3) gives us $v \approx 3$ m/s, and the kinetic energy associated with this velocity is only about $10^{-8}$ eV.