Why do trees need sun?
The trees and most plant life needs the sun to make food. The sunlight serves as the process called photosynthesis which the plant utilizes in combining water and mineral to create plant starch which in turn serves as the plants food.
It is because without it we would have no light so no plants could grow and we wouldn't be able to get the food that grows on trees or in the ground because there is no sun to keep them growing and they would just die. We need trees and plants to survive because they take in all of the carbon dioxide that we don't need and give us the oxygen that we do need.
Trees (plants) need sunlight in order to photosynthesize. That is to trap some of the sun's energy in the manufacture of sugar. Plants don't eat they get their food from the sun and all things that eat plants (including you and me) could not exist without plants doing this. The energy that enables you to lift your arm came from the sun!
Ok so the reason why you see leaning palm trees in pictures is because they are growing toward the sun. Not all palm trees lean. that would be the biggest myth ever. Pine trees, oak trees, elm trees, maple tree adn just about every other plant will do the same thing. They need light to be able to survive.