I don't have a perfect answer, but i think if you want to know the purpose of something you should look at its objective and subjective results. I do believe there are human beings that gain morality through religion and can also gain it through the lack of religion and by pure experience alone. That being said for those who don't go through the experiences and need obtain some empathy for their fellow man then religion is a good place to start. So i guess you can say it's a faster and family friendly way of obtaining morality. I would also state that its the Fellowship one finds within religious groups that would make a great purpose. Now only if they would actually adhere to the religious teaching of Jesus Christ and stick to the concept of Holiness, forgiveness, empathy, tolerance and leading by example with these concept rather than passing judgement that was meant for GOD alone in first place then people wouldn't be asking these questions. Groups are a good way to feel wanted, they promote trust which begets the feeling of safety. So i think religion has tremendous purpose, but it needs to let go of its pride and maybe we might find our purpose too.