How does the process of photosynthesis contribute to the survival of plants?