Transpiration is just a side-effect of the way leaves are adapted for photosynthesis. They have to have stomata in them so that gases can be exchanged easily (see next page). Because there's more water inside the plant than in the air outside, the water escapes from the leaves through the stomata by diffusion.