This is a question we were asked at a physics lecture.
Because there is an energy barrier between the metal and vacuum. Consider the ions in the metal as a uniformly distributed positive charge. Near the metal surface, the free electron wave function spread out a little into the vacuum, thus near the surface of metal the electric dipole forms with the electric field points to vacuum. Thus a gradual potential barrier will form.
Also think classically, when an electron near the surface of metal, it creates an positive image charge, which pull electron back to metal.
Finally, what we are talking about is called work function.
Because the electrical force on an electron is around 10^39 times that of gravity. Given the equivalence between gravitational and acceleration forces, you would have to shake it quite hard. Before you got to the point where an electron would drop out the entire material would disintegrate and all kinds of other phenomena would take precedence over you finding those spare electrons.