The spring allows for the portafilter basket to securely fit in the portafilter.