Storms don’t have a purpose. They are the result of a combination of forces (mainly due to heat and friction) acting over water or land. I imagine it might be possible for a planet with an atmosphere to not have storms, given exactly the right conditions (its distance from the sun, speed of rotation, revolution around the sun, etc.), but there will always be storms on Earth.