As in my reply to the question Diffracted electron - where does it gain additional momentum? it depends on the size of the slit and the energy of the electron. If the energy of the electron is large enough and the slit large enough, the scattering on the field of the atoms at the sides of the slit will radiate a photon and change the direction of the electron.
If the size of the slit and the energy of the electron are of the order of h_bar where the wave nature of the diffracted electron will become evident, the answer to this is the same as the answer of "why the electron does not fall on the nucleus but stays about the atom without radiating photons". It led to the Bohr model of the atom to start with and then to the full Schrodinger equation and solutions of the hydrogen atom. These solutions give probability distributions for locating the electron.
Thus the answer is that the electron is a quantum mechanical entity, and the solution of "electron of vector momentum p + slit" has as a solution a probability distribution that allows the electron various paths, without radiating any energy. This is related to the Heisenberg uncertainty principle.
Here is the double slit experiment with accumulation of single electrons:

>Electron buildup over time
One observes that even though a single electron can be anyplace on the screen, the probability distribution built up during the experiment displays an interference pattern. It is a quantum mechanical effect dependent on the geometry of the slits but it shows that the electron is not radiating away random photons, as there would be no interference pattern. The question is about a single slit, but the physics is the same, just the boundary conditions are different for the quantum mechanical problem.
Edit after comments, as the answer has gotten a number of negative votes, to clarify radiation or not by the electron
Take the electron at the maximum off center location in the top picture. It is evident that it has gotten a momentum in the x direction. Treated classically, how could it get there with all its energy? Classically a neutral ball can scatter elastically, momentum being conserved by the whole solid where the ball would hit/graze. Classically though a charged particle changing direction drastically should radiate and it would lose energy, more energy the higher the angle. This random loss of energy would destroy an interference pattern, as the questioner guesses. As interference is observed and we know that the framework is quantum mechanical at the level of atoms and electrons, a wavefunction must exist giving the probability distribution of finding an electron given the boundary conditions of two slits with no energy loss , similar to the energy levels in atoms where the electron might be in any position in the orbitals without radiating.