… Not one aggressively secular, historically informed answer to the question? Really? OP is clearly looking for one:
Some religions made it a main cause to conquer countries i.e. Islam, others’ was to unite religions i.e. Sikhism.
I’m not contradicting the other answers, but there is a place for this answer too. If any of you as Christians do not wish to be scandalised by a secular perspective, well, please stop reading now.
The purpose behind the Historical Jesus’ preaching, so far as secular scholars can discern (and Historical Jesus research is notoriously slippery) was either apocalyptical (the majority view), or a commensal egalitarianism (Crossan’s view). Either to prepare Jews for the end days and the return of the Messiah; or to subvert the power structures of Jewish life with a community of embryonic socialism.
I like the latter narrative, but it seems to have fallen back out of fashion now.
The purpose of Jewish Christianity was to keep the Historical Jesus’ vision going, within the framework of Judaism.
The purpose of Pauline Christianity, and all the other shards of practice that emerged away from Jerusalem over the next century, seems to have been more radical still (leading to its rupture with Judaism), but also much less coherent. Whatever their theologies (and there were many), a common social imperative was offering support and succour to the Roman underclass.
The purpose of Imperial Christianity was to harness the emerging religion to the cause of unifying the empire. As civic institutions decayed, the emperors noticed that the hierarchy developed around the Christian church could fill in many of the functions that the civil service and noble benefactors no longer could—including, but certainly no longer restricted to, offering support and succour to the Roman underclass.