Shelf life and taste of fruit are inversely correlated. A few factors off the top of my head are:
- It is extremely difficult to breed a fruit variety that's good at two things at once. The varieties that are bred for long life are not bred for taste.
- It is "very expensive" for a plant (metabolically) to produce aroma, it's also expensive to produce color, and it's expensive to produce sugar. All three at once are really rare.
- fruit that has been picked earlier (less ripe) lasts longer and looks better, and is less tasty.
- fruit that has been stored under refrigeration lasts longer, and is less tasty.
- fruit that has more aroma is more attractive to insects, whose bite sites spoil a fruit directly and also create openings for bacteria and mold to enter
- fruit that is riper (and tastes better) is easier damaged during handling, which makes it easy for bacteria and mold to enter
Combine that with a segmented market. On the one side, you have the buyers who are not very sensitive to taste, and are sensitive to convenience and price. They buy at supermarkets, and tend to choose their fruit by looks. Then you have farmers who corner the "high-taste" market niche with fruit that is optimized for taste, and they find buyers who are willing to pay more and give up the convenience of shopping at a supermarket in order to get the best taste. These farmers don't have the incentive or resources to optimize for traits that diminish taste, and sometimes are against it because of personal conviction. These farmers tend to sell at open-air markets.
Bottom line, if you value shelf life very highly, the best strategy for you is to buy your fruit from suppliers who optimize for it, in that case the supermarkets.