ALIEN EARTH | were humans part of this earth? or did we occupy this planet.

We humans often fonder around in discovering new life forms and wonder the reasons for their formation and extinction. When we look at the nature of our planet, there is a reason and purpose behind every life forms on planet earth, which has a role to play in food chains, but where do we fit in those? what's the reason behind our creation and existence?
The universe is always short of matters and regularly optimizes the life forms within by creating new life forms with purpose in mind, and eliminates the old life forms which have no more role to play in the cycles of the universe.
when we turn around our ancient scriptures we could find some human-like looking creatures that were co-existing in ancient times. so what could be the reason behind the extinction of those creatures, and is there a reason behind the survival of humans on earth even though we don't fit anywhere in the food chains of earth. and why are humans still on earth, do we have a purpose here on earth, or we a leftover species on earth?....only the time should answer these questions.