Why is it necessarry to have a vacuum?
If the vacuum chamber was left at regular atmospheric pressure, the electrons would interact with gas molecules in the air and be deflected away from the electron beam before they reached the sample. Under vacuum there are very few gas moleculesto impede the electrons and a larger number of electrons reach the sample.