The scientific term that best describes this scenario is natural selection.
This is because the birds with long legs have a survival advantage in their environment due to their ability to access food, leading to a change in the population over time.