Fundamentally, it's because of quantum mechanics. When you quantize the electromagnetic modes of a system, you find that each modes' quadratures—the mode's amplitude and its time-derivative—have a Hamiltonian identical to the mechanical harmonic oscillator, only amplitude has replaced position and amplitude's time-derivative has replaced momentum. Quantum mechanics then tells you that the energy eigenstates of the mode can only occur in discrete steps of [itex]\hbar \omega[/itex].
The rest is really semantics. If an electron could add energy to the mode by adding an a photon of arbitrary phase to the mode's amplitude, it would change the energy by an amount other than [itex]\hbar \omega[/itex]. However, this is quantum mechanically forbidden, so its only possibilities are to do nothing, to absorb [itex]\hbar \omega[/itex] from the field by adding a field completely out-of-phase, or to emit [itex]\hbar \omega[/itex] into the field by adding a field completely in-phase.