Humans have been modifying the genetics of food for more than 10,000 years, since the dawn of agriculture. The methods by which humans have modified plants and animals have become more sophisticated with technology, especially in recent history, but it all began with humans selecting for desirable plant and animal characteristics.
We've been genetically modifying foods by using recombinant DNA techniques (GMOs) for more than 25 years.
We use this method, which is commonly referred to as creating "GMO" crops, for the same reasons that humans began growing food -- to develop plants and animals with desired characteristics, or traits, to serve some purpose. You can see examples of the traits available in current GM crops in the United States in the infographic below.
If you have any further questions, please ask.