Plants evolve a myriad ways of reproducing, through mutation. Some are more successful and are passed on. Others are dismal failures and the first generation is the last.
Remember that berries are a very recent development in the plant kingdom. There were already invertebrates on the land to take advantage of them. Fruit was not all that fabulous a development for the vertebrates who lived on the land. When it fell off the tree, it was a nice little high-energy treat for the little mammals that scampered around on the forest floor, but they got their daily protein allotment by eating insects and worms. Or the reproductive tissue of older types of plants, such as spores and cones.
But when the first mammals developed the ability to climb trees--primitive shrews--and adapted to a fruit-intensive diet, they evolved into primitive sloths: slow-moving creatures that can survive on the incredibly protein-poor diet of a fructivore. They lived to tell about it only because there were not yet any arboreal predators to chase them. Eventually some of them evolved into primitive primates, who could catch bugs and other small animals, and with that boost in protein they became both fast and smart, almost ruling the arboreal ecosystem.
It was really birds who made the symbiosis work between warm-blooded animals and fruit-bearing trees. Birds require a food supply high in calories because flying is a horribly energy-inefficient way to locomote. And because birds can fly, they can get up there and eat it before it falls to the ground to be gobbled by scavengers. And because birds can fly, they carry the seeds great distances, spreading the plant species in a wider region so it can become established in new, promising locations.
What a combination of genetic coincidences! Seems so unlikely, eh?
Well, the only reason any of these evolutions take place is that they have tens of millions of years to do it. As I have noted in other threads, few people really have the cognitive ability to understand timespans measured with seven zeroes. It's only been two thousand years since the heyday of the Roman empire, a history that has been meticulously and continuously documented in writing, and most of us don't really even comprehend the magnitude of changes that have occurred on earth during that time. To go back so far that genetic mutations have enough time to give rise to whole new species--whole new phyla in fact--is something that makes our heads hurt. It's all in the math. If you get to have a new generation of an animal or plant species every year, that means that in fifty million years you've had fifty million generations. How many "experiments" in mutation, as it were, can Mother Nature try out over fifty million generations? Lots of them! If one doesn't work because there's no animal to eat that plant, then that experiment fails, but another one comes along a million years later and maybe it's the one that works.