Q: What is the purpose of life?
A: What if a bacteria asked this question? Probably, the answer saying, “You were the outcome of evolution and came to survive more hostile antibiotics” would be satisfactory. What if a mosquito asked this question? Probably, the answer saying, “You were the outcome of evolution and came to survive more hostile repellents and suck the blood cleverly without making much noise etc.” would be satisfactory. Since we humans consider ourselves special having far superior intellect & networking ability, many of us will not be satisfied with the answer that we are merely a product of evolution. We would ask how did evolution start followed by a series of whys leading to the direction of big bang. But if we consider a 6 foot tall man in comparison to the universe/multiverse then he may only be marginally better of than a mosquito in grand scheme of things.
On a more serious note, an individual in reality is consciousness which is U-kāra (formless/shapeless) about which the individual does not know and he/she continues to identify himself/herself with body-mind. The dream of consciousness is A-kāra (shape, i.e. the body). When it is realised that false identification was made and the real nature is revealed as consciousness, there is Ma-kāra (merging, wisdom). So, AUM sums it up. Besides playing life following the code of conduct of the dreamworld, your purpose can be to realise your true nature which is not the body-mind complex but is pure consciousness.