The heron is trying to cool its core temp by holding its wings out which allows air to circulate across its body and sweep away the excess heat. It is also using a technique called gular fluttering. It opens its mouth and flutters its neck muscles, promoting heat loss. Kind of like when a dog pants.
Great Blue Heron ( Ardea Herodias)