Edge effects. After the electron leaves the capacitor, the electric field winds up slowing it back down.
Let's assume the capacitor is infinitely-massive and that the acceleration of the electron is small enough that we can ignore radiation.
Then if you were to idealize the electric field of the capacitor, treating it as a uniform field between the plates and zero elsewhere, then the electron that comes in from the side would pick up some energy and we'd have a violation of energy conservation.
However, the idealized E-field does not obey Maxwell's equations. The true E-field can be written as a gradient of some potential, and that potential in free space is smooth because it's a solution to Laplace's equation. The E-field that abruptly goes from zero outside the capacitor to a constant inside the capacitor clearly does not derive from the gradient of a smooth potential.
Since the E-field is the gradient of a potential, obviously energy is conserved. By the time the electron gets far away from the capacitor, it is back to the same kinetic energy it had to begin.
That's the answer to the question - energy is conserved for the electron because it's conserved in general for charged particles moving in a potential - but to see it in some detail, think of the field far from the capacitor as a dipole.
source: http://demo.webassign.net/ebooks/cj6demo/pc/c18/read/main/c18x18_7.htm
If you superimpose your drawn electron trajectory with this picture, you'll see that when the electron leaves the capacitor, it moves roughly the same direction as the field lines point. That is, the dot product of the field lines and the velocity is positive. Since an electron has negative charge, this means the electron is losing energy.
So the electron will pick up energy as it comes from far away and enters the capacitor, but lose that energy as it leaves again. This is because the capacitor field is an electrostatic field and can be described by a potential $V$, and basic EM tells us that energy is conserved in such a situation if we give the electron potential energy $qV$.