Why does a flamingo lift up one leg?

Because if it lifted both legs it would fall over!