The process of exchange of energy between a photon and an electron only occur after a specific energy called work-function of the material. Thus, the energy transferred is quantised due to the fact that the electron can reside only in quantised orbits.
But, why doesn't the process happen in steps? I mean the electron getting excited to a higher orbit and before the electron gets de-excited another photon gives it energy to escape from the metal. Is it theoretically possible?