Different animals do that in different ways. The gland collects any extra salt that gets into the animal's blood. Sea birds have salt glands too. But they dribble the extra salt out through their noses. Because the climate there is all wrong.
Bananas are tropical plants.
They grow in places where it's warm and humid year round. Different kinds of plants have different needs for surviving. Each kind needs the right type of soil, the right amounts of light and moisture, and the right temperatures. Some kinds even depend on other living things, such as a certain animal to pollinate their flowers. For banana plants to get all the things they need, they have to grow in a particular place.