Fruit must ripen in order to become edible or at least in order to become something that people want to eat. The process of fruit ripening makes them softer and sweeter and produces a natural form of a chemical that is actually synthesized to make PVC. PVC is used in piping and plastic bags.
The chemical that makes plants ripen is a gaseous plant hormone called ethylene. When fruit ripens it is actually on its way to rotting. When we eat perfectly ripened fruit we are catching it just before it has ripened too far and begun the rotting process.