The diffraction pattern is due to elastic scattering from the "ion core", which is the stationary net charge of the atomic nucleus and it's bound electrons; these elastically scattered electrons don't lose any energy. The electrons which interact with the free electrons are inelastically scattered, and contribute a foggy background to the diffraction pattern.
Because of the energies involved this latter process may eject some of the free electrons, or generate x-rays. For an electron microscope the energies may vary from 20 to 200 keV or more; for low energy electron probes the electrons may have only a few eV.
There are many valuable applications for electron probes, including imaging, diffraction, and analysis. Electrons, x-rays, and neutrons each has it's own unique advantages.