Over the course of evolution, its hind legs turned into wings. By alternately resting its front and rear wings, it can fly all day without having to stop.
The transformation of its legs into wings made it better at flying, but more clumsy at walking.