In this book, Pollan explores the ways that plants develop certain characteristics to help prolong their lives or protect them from predators. In the case of the apple, the normally-bitter fruit was widely used to make cider after trees were brought to the New World from England. When drinking alcoholic beverages became forbidden, the apple underwent a sort of "image overhaul" and was promoted as a healthy fruit; there was also effort made by growers to graft sweeter apples (which would occasionally appear spontaneously in the wild) and produce apples better suited to eating.
Plants producing sweeter fruit can attract more animal attention, and the animals' droppings can help spread the seeds further, thus allowing the trees to propagate and increase their diversity. Likewise, a plant that produces bitter tastes or poisons will be left alone by animals, and thereby protect itself from being eaten or eliminated (such as mushrooms or some berries like sumac). Some fruits are bitter until they are ripe, thereby protecting the trees during the more vulnerable part of their growing cycle (in spring, for examples). Examples here would include persimmons (these are very sour and inedible until they ripen) or peaches (which are hard and tasteless until they are ripe).