The ripening of fruits and vegetables happens with the aid of ethylene. This gas was discovered in 1912. Since it is produced by the actual fruit, there is no need for it to ripen while still attached to the tree.
The ripening of a picked fruit may even occur faster than an unpicked one, since the lack of moisture causes more ethylene production.
And if you place a ripe fruit or vegetable next to unripe ones, they will ripen even faster. This is due to the increased ethylene production of the ripe one.
Fruits and vegetables that are picked for the purpose of being sold at a market are usually unripe. They ripen during transportation to the place where they will be sold.
In some trucks there are special devices that release ethylene in the required doses for ripening. It is also ethylene that causes the rotting of fruits and vegetables that are already ripe. That's why in some storage rooms there are devices that release a gas that blocks the effects of ethylene.
The effect of an unripe fruit ripening quicker because of the intake of ethylene is increased even more when in a paper bag because the limited space allows it to absorb a higher quantity of the gas.
Plastic bags are not recommended, since they lead to smothering and decay.
A paper bag, a the plastic one, lets in enough oxygen for the continuation of the process.