An apple tree produces apples as a part of its reproductive process. The primary purpose of the fruit is to protect and disperse the seeds of the tree. When the apple is ripe, it contains seeds within it. Animals or humans that consume the apple may spread the seeds through their droppings or by discarding the core in a different location. This dispersal mechanism allows the apple tree to reproduce and propagate its species.