Usually photons are considered to have the possibilty to behave as a quantum. The quantization in an atom is because of the nature of the Coulomb force coupling the electron to the nucleus.
But why can't the photon transfer part of its energy to the electron (enough to transition between two energy levels) and then travel on with reduced energy? After all, it can transfer enough energy to completely ionize the electron ( Compton scattering) so why not just enough to excite the electron between two energy states?