system
Given the following post, respond as if you're commenting on Reddit:
human
Why do fruits get sweeter the longer you wait?
gpt
The sugars in fruit are there to encourage animals to eat it.  The idea, evolutionarily speaking, is to have an animal, which can move, carry the plant's seeds far away.  The seeds will eventually end up in a new place, most likely in a nutrient-rich pile of manure.  This benefits the plant by helping it to reproduce and disperse.

But the seeds take time to mature, and if an animal eats the fruit before the seeds are ready then they won't be able to grow, and the plant will have wasted its energy.  So unripe fruit is full of starch instead of sugar.  It doesn't taste as good, so animals don't eat it, but when the seeds are mature the plant can easily convert the starches to sugars using enzymes.  The longer the fruit has been ripe, the more starch has been converted to sugar. 
 Fruits are also often sour before they ripen, which further discourages animals from eating them too soon.  Some fruits, like peppers, even have chemicals that discourage mammals from eating them by being "hot," but don't affect birds (which travel farther).