The old proverb that one bad apple spoils the whole bunch is rooted in scientific truth. Apples, along with some other fruits, produce a gaseous hormone and ripening agent called ethylene. Overripe and rotting apples give off higher concentrations of ethylene, speeding up the rotting process of the whole bunch.
Moldy apples will also shorten the life expectancy of the whole group, as the mold will search for additional food sources and quickly spread.
Life tip slash experiment: Want to quickly ripen an avocado? Leave it in a bag with an apple overnight and let it soak up the ethylene.