The purpose is to create the perfect man. Each man must find his own way, through his own deeds, to Heaven. Failing which he will be sent back, reborn to try again.
I spent my life drinking beer and chasing girls,.... the rest I wasted.
Way I see it, God created me the way I am and saw fit that I ended up in Thailand, the land of beer and pussy. What did he expect was going to happen?