As beautiful as migration may be to watch, the impulse behind it is entirely practical—species are searching for better sources of winter food. But what if they could find food even when the weather turns cold?

That’s the conundrum facing the White Stork, a gorgeous white bird that typically trades in its summer digs in Europe for winters in southern Africa. In recent years, more and more White Storks are choosing to stay closer to home and scrounge for easy pickings in landfills and fish farms.

“The stork is always thought of as a nice clean bird, and then they spend the winter eating garbage,” says ornithologist Andrea Flack of the Max Planck Institute for Ornithology in Germany, whose research tracking White Stork migrations was published last week in Science Advances. “It changes the image I would say.”

Flack and her colleagues didn’t set out to document filthy stork behavior. They were after something much simpler—to compare the migration routes of storks throughout Europe. To do so, they strapped satellite tags, capable of transmitting the birds’ geolocations, onto 70 juvenile storks before they left their nests. They also wanted to know how much energy each route takes. Since there’s no calorimeter to measure energy use in birds, the researchers used the next best thing: acceleration sensors built into the tags that, like the one in your smart phone, measure orientation and movement speed, which can then be converted into energy used.

Which Storks Stay, and Which Storks Go

The tags revealed that White Storks from Europe follow three migration strategies. One group included traditional migrants from Russia, Poland, and Greece that flew past the Sahara Desert to the African savannah, travelling an average distance of 16,500 kilometers, munching on their normal southern food sources. The second group (including storks from Spain, Tunisia, and southwest Germany) migrated south nearly 5,000 kilometers to northern Africa—and feasted on human scraps in landfills, cities and towns, and farms. And the third group stayed local: Armenian storks flew less than 1,000 km to the Persian Gulf, while Uzbek storks hardly strayed more than 100 kilometers from home. The researchers suspect that these birds ate food that humans fed directly to the storks, or perhaps found food sources from fish farms in the area.

Flack was surprised to find that all of the storks required similar amounts of energy to migrate and feed throughout the winter, regardless of how far they flew. The birds that went the farthest actually spent less energy migrating—surfing the breeze pays off energetically—but they had to work hard to hunt for food once they arrived at their hunting grounds. The birds that remained closer to home faced treacherous winter flying conditions that burned a lot of energy, and they compensated for this by expending minimal energy digging through human leftovers.

“It’s a further demonstration of the fact that although migration is an astonishing and complex phenomenon, for an awful lot of birds it’s also quite malleable,” says ecologist David Wilcove of Princeton University, who studies bird migration in the face of human change and was not involved in the research. He notes instances where birds have changed their migratory routes to more closely follow birdfeeders, or to avoid treacherous conditions created by climate change, and others that invented new routes after being introduced to new areas.

“It gives cause for a little bit of optimism that animals will find a way to adjust their migrations to climate change,” he says. “But on the other hand, you can’t get too complacent about it because we don’t know if it’s going to be true for most birds.”

How Does Trash Stack Up, Nutritionally?

But one important question remains: Is it healthy for storks to eat trash?

Unfortunately, this study can’t give us a definitive answer on that. On the one hand, their attraction to landfills could be a beneficial adaptation, as the birds take advantage of novel food sources created by people. On the other, feeding among sometimes-toxic refuse could kill individual birds or affect their fertility.

“There’s a lot of organic waste on these sites, and some animals can live quite well off of this,” says Flack. “But it’s also quite dangerous; you eat the wrong thing and you’re dead. We don’t know what it does to the storks in the long term.”

Additionally, these human interventions could disrupt reliable migratory routes in the long-term, with unknown results. “We don’t know in general whether it’s a bad thing to shorten their migrations,” says Flack.

Rest assured that Flack and her colleagues are on the case. She’s now looking into how the storks learn and adjust their routes—how much of migration is innate, how much is learned, and how much is improvised.

“We’re really in a golden age for studying animal migrations and it’s only going to get better,” says Wilcove. “We can really begin to answer questions that people have been puzzling about for centuries.”