History is all about context!
Guru Nanak lived in a time of upheaval and war, India at the time was ruled by the Delhi sultanate, which had gone from this:
to this:
in less than 30 years! And still the anarchy went on and on, Bahuhul Lodi destroyed Jaunpur, Sikandar Lodi killed Barbak Shah, Ibrahim lodi killed Jalal Khan and so on, and on - every few years a new king and a new war.
In this backdrop did Guru Nanak make his iconic journeys, to all the parts of india, and beyond - even to far Baghdad and Damascus. And time and time again he warned the decadent rulers of Delhi, eventually denouncing them -
such are the blasphemers,
Who set themselves up,
As the leaders and rulers of the world;
They consume daily the forbidden fruit of falsehood,
And yet they preach to others,
What is right and what is wrong.
Themselves deluded, they delude others also,
Who follow them in their path.
If one smear of blood pollutes a garment,
And renders it unclean, to be worn at prayer,
How can they that like vampires suck human blood pass, as pure,
(Guru Nanak : Var Majh p. 140)
That is a key point, for Guru Nanak the Sultans of Delhi were unworthy, and indeed they had given ample evidence for that already.
And then, in yet another rebellion, Daulat Khan - the governor of Punjab rose against delhi, and this time asked for help from a new upstart conqueror of Kabul - Babur.
It was not a quick war, dragging for years, but eventually Babur, with the legacy of Genghis Khan and the cannons of the Timurids, prevailed. But, Guru Nanak condemned the invasion throughout, he traveled to Syedur, to Lahore, to Panipat, and counted the cost.
Where are the stables and steeds ?
Where are bugles and drums that beat ?
Where are the buckled sword and arms ?
Where are the scarlet uniforms ?
Where are the mirrors and handsome faces ?
Thou, O Lord of the earth,
In a moment Thou createst,
In a moment Thou destroyest.
Where are those palaces and mansions,
Where are those luxurious seraglios ?
Where are those warm beds Seeing which sleep departs ?
Where are those damsels With red lips, chewing beetles ?
All has vanished and become dust.
Wealth has consumed so many,
It cannot be amassed without sinning.
It accompanies not any one when he dies.
(Guru Nanak Asa Asht 417)
And it was then - the new ruler of Delhi invited him for a meeting.
Babur was a visionary - he must have known he could not rule India by force, even the greatest man of his lineage - Timur himself could only destroy Delhi and leave.
(In many ways setting the stage for the current act!) He needed local support, which he already had to a degree in the former governors of the Sultanate who had sided with him; but the grassroots following of Guru Nanak was even then large, and Babur was keen enough to know how valuable that can be to him.And as for Guru Nanak, this must have seemed as the opportunity of a lifetime - the patronage and ear of a powerful ruler, he could push his agenda and stop the senseless destruction that had so wearied his soul.
And so they met, the Saint and the Conqueror, and for whatever reasons there may be, Guru Nanak gave his blessings, and a new dynasty was born.