In some ways, mountain lions—also known as pumas, panthers, catamount or cougar depending on the region its found—can seem like a wasteful animal. Even though most average about 150 pounds, they will still take down a massive animal, like a 700-pound elk, more than it could ever eat on its own. But a recent study suggests that’s not necessarily a bad thing. The meaty leftovers from the big cat’s kill actually powers an entire ecosystem of insects and also benefits birds and other mammals.

Researchers studied 18 elk and mule deer carcasses left behind by mountain lions in Wyoming’s Bridger-Teton National Forest in May of 2016, setting up beetle traps at each site. The team—led by Mark Elbroch, the puma program director for the big cat research and conservation organization Panthera—then visited each carcass weekly over six months to collect data. What they found was an entire ecosystem of beetles feasting on the carcasses, collecting 24,000 individual beetles from 215 different species, according to the new study published in the journal Oecologia. In sites without carcasses located just 65 feet away from the kills, they found a mere 4,000 beetles in comparison.

“It really speaks to the complexity of what’s happening at these sites,” Elbroch tells Jason Bittel at National Geographic. “We found all these species that I didn’t even know existed.”

While northern carrion beetles, which feast on fresh meat, made up about half of the individual beetles collected, Bittel reports that more unusual species were also found around the carcass. They discovered beetles in the Curculionidae family, which normally eat plants that may have been dining out on the stomach contents of the deer. They also found beetles that snack on slugs and snails, which are often found under the animal carcasses.

The dead deer weren't just passing snacks for the beetles. For many of these insects, the rotting meat pile was their permanent address. “These carcasses are their homes. They are the places where they seek their mates. They’re the places where they raise their young and where they hide from predators,” Elbroch tells Bittel.

John C. Cannon at Mongabay reports that these papers suggest that mountain lions could be considered “ecosystem engineers.” Typically, that term is reserved for animals like beavers that flood streams, elephants that dig watering holes or woodchucks that excavate burrows that other species use. But scattering meat across the landscape creates a whole new world for certain insects, whose offspring migrate from kill site to kill site.

While leaving all the extra venison behind may seem wasteful, Elbroch tells Cannon there’s a reason why mountain lions bite off more than they can swallow. While pumas are skilled hunters, they’re not at the top of the food chain. They are solitary hunters and are often forced to hand over their prey to wolves, larger bears and jaguars, meaning they are “subordinate apex predators.” Because they will return to feed at a site over several days, killing something big means there may be some meat left after a grizzly bear or wolf pack takes their cut.

And mountain lions may not be the only big cats who deserve the “ecosystem engineer” degree. Elbroch and his team previously identified six other cats, including the cheetah in the African savannah and clouded leopards in Borneo, who perform a similar function, leaving carrion piles across about 43 percent of the Earth’s surface, in a 2017 study in the journal Biological Conservation.

In the United States, mountain lions have been extirpated east of the Mississippi except for an endangered population in south Florida. Understanding their natural history, Elbroch says in a blog post, is necessary for managing their populations and setting limits on hunting.