Set $c=1$ and denote the electron/positron mass by $m$. Suppose that we go to the rest frame of the collision, which we can always do when considering massive particles. Then we can write the 4-momentum of the electron as $(E, \vec{p}) =(\sqrt{m^2 + \vec{p}^2}, p_x, p_y, p_z)$ and the 4-momentum of the positron as $(\sqrt{m^2 + \vec{p}^2}, -p_x, -p_y, -p_z)$.
At some point during the collision, the positron and electron will annihilate under the formation of one photon; however, by conservation of momentum, if nothing else happens, that photon will have 4-momentum $(E, \vec{p}) = (2 \sqrt{m^2 + \vec{p}^2},0,0,0)$. This means that it is not on-shell, as its energy and momentum do not satisfy $E = |\vec{p} |$. Therefore, something else has to happen in order for us to end up with real particles instead of virtual ones.
Conversely, one can start with an energetic on-shell photon with $E \geq 2m$. Now we cannot go to the rest frame of the photon, because the photon is a massless particle. So suppose the photon moves in the z-direction; then it has 4-momentum $(E,0,0,E)$. If the photon then decays into a positron and an electron, one could go to the rest frame of the positron or the electron. In the rest frame of the positron (for definiteness), the positron will have four-momentum $(m, 0,0,0)$ and therefore the electron will have four-momentum $(E-m, 0,0, E)$. But now you can convince yourself that the electron is not on shell either, so again some other process has to happen to make all the outgoing particles real.