Hi,
I must be honest. Your question surprised me. I had no idea. I spent hours trying to find the answer. Was not easy but I've got it:
1. The only exposed parts of their body are legs and
head. To avoid massive heat loss they stand on
one leg.
2. Standing on 1 leg enables them to tilt their head
backwards into the fethers. That's a 2nd way to
conserve heat.
3. Another theory: This position is less frightening
to the prey (fish. frogs, etc).
4. And some think that in this possition the bird put
a shade that provides some advantage in catching
it's prey.
Best regards,