It's part of their nourishing process; water is absorbed from the soil, but excess water has to be expelled. This process is called transpiration - yes, like in humans. When this process is described along with evaporation - what happens on the leaves - it's called evapotranspiration.