Every nut is a perfect survival capsule. The hard outer case protects the contents, which in turn provide everything the embryo tree inside needs to germinate and grow a good root so it can develop and make its own food.
All that goodness inside also makes it a perfect food for other creatures too, from mice and squirrels to hungry humans.