The moment you workout muscles, the body produces lactic acid which makes the muscles fatigued and sore. Hence, it is important to stretch as stretching eliminates the lactic acid that has accumulated inside the body and also relaxes the muscles.

https://www.disc-me.com/benefits-of-stretching-after-workouts/