The rulers of the Mughal Empire saw themselves as appointed by Divine Will to rule over a large and heterogeneous populace. Although this grand vision was often circumscribed by actual political circumstances, it remained important.
At the time of the Mughal Empire, there were a lot of wars going on. It was a continuous struggle to stay put as an one ruler. For example, Zahiruddin Babur, the founder of the Mughal Empire and the first Mughal ruler in India, was related to the Turkish ruler Timur on the paternal side and to Ghenghiz Khan from his mother’s side. First, Barbur succeeded his father as a ruler of Farghana (central Asia). But, soon, he was defeated by his distant relative (and warring Uzbeks) and lost his kingdom as a result. He became wonder for sometimes until he captured Kabul from one of his uncles and established himself there before pushed further into the Indian subcontinent in search of territories and resources to satisfy the needs of the members of his clan. Hence, Babur became first emperor of the Mughal Empire and made Agra as his capital in 1526. Babur's son, Nasiruddin Humayun succeeded him, and expanded the frontiers of the empire, but lost it to the Afghan leader Sher Shah Suri who drove him into exile.
Thus, Divine Will has nothing to do with appointing a ruler, but actual political circumstances have driven it. Yet, the grand vision was so important that each ruler has decided to transmit "the vision" through the writing of dynastic histories (cronicles). Consequently, the Mughal kings have commissioned court historians to write accounts, which have recorded the events of the emperor’s time.