Birds are well known for their unique (other than bats) ability among vertebrates of flight. Through millions of years of evolution, before they were even classified as such, and for reasons and methods still largely unknown, birds evolved the ability to fly. However, like all evolution, there is no end goal or final product. Because of this, traits and adaptations evolve and then can disappear.
"The Evolution of Flightless Ratite Birds,"
Spectrum: Vol. 7
, Article 4.
Available at: https://scholars.unh.edu/spectrum/vol7/iss1/4