Every week or so, the sloth descends from its favorite tree to defecate. It digs a hole, covers the dung with leaves and, if it’s lucky, climbs back up its tree. The sloth is highly vulnerable on the ground and an easy prey for jaguars in the forest and for coyotes and feral dogs in the chocolate-producing cacao tree plantations that it has learned to colonize. Half of all sloth deaths occur on the ground. The other serious hazard in its life is an aerial predator, the harpy eagle.

Why then does the sloth take such a risk every week? Researchers who first drew attention to this puzzle in 1978 suggested that the sloth was seeking to fertilize its favorite tree. Meanwhile, the algae that gave the sloth’s coat a greenish hue were assumed to provide camouflage.

Writing last week in Proceedings of the Royal Society B, the Wisconsin researchers assembled all these pieces in a different way. They started by trying to understand what would compel the sloth to brave the dangers of a weekly visit to ground zero.

Its distant evolutionary cousin, the two-toed sloth, stays safely in the canopy, out of the jaguar’s view. The visit to the ground, the researchers concluded, could not be for the tree’s benefit, because the sloth’s dung would not make much difference to its nutrition. Rather, they assumed, it was to favor a critical component of the sloth’s ecosystem, the pyralid moth. The descent to the sloth’s midden affords the pregnant moths in its fleece a chance to lay eggs.