Why are forelimbs modified as wings in birds?

because the main mode of locomotion used by most of the bird species is flight