these big rooted trees are the kidneys of the coast and grow near, you guessed it water, they help clear the water for near shore plants like seagrasses etc. They firm up the soil and prevent erosion from say storms
They can also be nurseries for young fish and are commonly found in warm (sub)tropical areas as they are unresistant to cold