It might sound strange to say that rain keeps the earth dry, but that’s exactly what it does.
The process that results in rain gathers moisture from the air and concentrates it in clouds, which later deposit the water in the form of rain.
If this moisture didn’t condense to form rain, then the atmosphere would be unbearably humid, the entire earth would be heavily covered with moisture, and life as we know it probably couldn’t exist.