The riper a piece of fruit is, the more ethylene it produces, and overripe fruit gives off even more ethylene, eventually leading to a concentration of the gas that’s enough to overripen all the fruit. Given the right conditions and enough time, one apple can push all the fruit around it to ripen—and eventually rot.
Additionally, an apple that is infested with mold will contaminate other fruit it's stored with as the mold seeks additional food sources and spreads.