A spatial filter is a device to 'clean up' a laser beam with an irregular intensity profile, and create a smooth Gaussian profile at the output.
It is usually said (e.g. here) that you need a microscope objective and a pinhole for this. The microscope objective creates the Fourier transform of the laser beam at its output. The pinhole acts as a low-pass filter in the Fourier plane of the lens, to remove unwanted high spatial frequency components of the beam.
Why is the microscope objective necessary, instead of any other lens with diffraction-limited performance (e.g. aspheric lenses)? What makes microscope objectives more suitable?