Religion played a crucial role in the Roman Empire and the Han Dynasty in China to bring stability in society. Before Christianity, the Roman Empire practice worshipping several goods as they favoured. By the arrival of Christianity, they now relied on a single religion with no conflict to who they should worship. It brought political stability and helped them spread their empire and introduce Christianity in far places like Spain, Britain, etc.
Buddhism reach China through the Silk Road and by Chinese travellers who reach India to get knowledge. Confucianism and Buddhism ideology gave stability in the society by introducing basic rules which allowed political stability with no conflict over rituals and customs.