The reason lies in the way we stand. Humans are plantigrades; we stand on the sole of our foot, which is composed by the toes, the tarsals and the metatarsals.
Birds are digitigrades; they stand on their toes. Tarsals and metatarsals fuse in only one bone (tarsusmetatarsus or simply metatarsus) and runs upright. This makes it more similar to our leg. The bird's leg ends just on the upper end of the metatarsus and there is found the ankle articulation. That is, the bird's leg seems "broken" in two parts. To imitate the disposition of the bird's leg we only need to tiptoe.
If the articulation shown by the beautiful egret is the ankle's, where is the knee? In fact it is covered along with femur by the contour plumage. The femur is very short in most bird species.
Another fact to pay attention to. If the pressumed egret's knee encircled in orange in the first photo were indeed the knee, then the egret would bend it in the opposite direction (note that it bends backwards, not forwards). If we stand on our toes we will see that our ankle also bends backwards.