Body temperature.
The body's at the right temperature.
Water is cold.
One foot in water will lose a lot of heat from the flamingo but if the other one is close to the body, it will stay warm.
This is a way to keep the temperature regulated and prevent bad functions or failure from colder temperatures.