The "purpose" of life is a result of the laws of thermodynamics. Planet earth is NOT a closed system. Sun light falls on it (until our sun dies out). The entropy needs to increase. Initially, the balance is achieved via physical processes (radiation etc.). Then chemical processes kick in. Molecules are formed using that energy. The biology started. Life is a form of dissipation of energy. The purpose of biological life is to reproduce. Plant makes use of the sunlight to produce the food it needs to produce more plant. Animals find it convenient to eat plant instead of doing the photosynthesis. Social animals adapts better because knowledge is shared and stored in the society. Human society, as an example, is full of "knowledge artefacts". Computer, Internet are examples of knowledge being used by common people. You and me may not have directly contributed to the *actual* building of the computer, however because we are part of the society (it is now global), we share the invention by other members of the society. In other words, human society is more efficient in fulfilling the second law of thermodynamics and hence we are populating the planet earth at great pace.
Our purpose of life is fundamentally driven by the law of thermodynamics and the evolution history.
I see the role of religion at this point of evolution as a parasite to the society. Religious organisations are just organisation trying to amass wealth and political power - for the purpose of continuing to amass wealth and political power. In the process, a lot of people are fooled into believing a human invention (god). The sad thing is that these believers are helping the religious organisations to spread false promises and unsupported claims.
A side effect of organisations amassing wealth and power (commercial organisations mainly focus on wealth only) is the divisive effect of us and others. Histories have ample examples of how religion caused wars and suffering of many.
It is about time for human to grow up and get rid of religion. We can expect these religious organisations to mount a fight for their survival and it will become nasty and dirty.