What is the function of a spring? The function of a spring is to absorb movement in the pipe caused by thermal and load displacements.