There are two philosophies which are most popular in Hinduism
I will explain what the Vedanta philosophy says about existence of humans and their purpose here.
Let start from the basic Physical Body and Atman (soul) . Atman ( soul ) is the real entity and which is considering itself as born and the doer of actions, physical body is a non living thing, made alive by the Atman( soul )
Why Atman, is thinking itself as body born in this world ?
Maya ( ignorance) is cause. Birds and animals feed their children even without knowing the science behind the reproduction and raising family. They all are driven by Maya ( including humans )
Maya is reason because of which Atman, think that it is born, it has a family and it has achieve something in this world.
2. why we are so attached to our purpose in this world ?
Vedanta says that this world is not a continuous process of birth and death, it is a conclusion of mind similar to a dream world. In dream one act as a body and think dream world as continuous, similarly we think this world as Real and permanent.
Our belief that this world is Real and permanent, only increase our ignorance to achieve something before our death.
What is purpose here ?
There is no purpose here, and there is no birth ( because Atman is never born or never dead, remember without soul body is a dead body).
But somehow we believe that we are living and the cause is Maya.