The Northern Hardwood Forest's Striped Maple's leaves are eaten by a caterpillar called the "Green Looper." It is a herbivore. The Black-capped Chickadee while moving among the branches of the Stripped Maple picks the Green Looper off the leaves. It is a carnivore. While flying aloft the Sharp Skinned Hawk may pick up a chickadee for a meal. That would also hold true for the Long-Tailed Weasel.
Where did this food chain begin? The sun and chlorophyll found in the Striped Maple. The sun's energy is picked up by the tree and passed on in the leaves to the caterpillar, then to the small bird, followed by the hawk and the weasel.
When these animals and the tree dies they are converted into soil and nutrients by the detritivores including fungi, bacteria and soil animals.
Every forest provides for the life of many species of animals. It is all possible because a tree grew and lived off of CO2 and chlorophyll as well as nutrients in the soil and rain from the sky.
Life has purpose and forest is just one example of the purpose found for every species on Earth.