Allah tells us that Dhul-Qarnayn then traveled from the west of the earth towards the east. Every time he passed a nation, he subjugated the people and called them to Allah. If they obeyed him, all well and good, otherwise he would humiliate them and take their wealth and possessions. From every nation he took what his armies needed to fight the next nation. When he reached the place where the sun rises, as Allah says,
وَجَدَهَا تَطْلُعُ عَلَى قَوْمٍ
(he found it rising on a people) meaning a nation,
لَّمْ نَجْعَل لَّهُمْ مِّن دُونِهَا سِتْراً
(for whom We (Allah) had provided no shelter against the sun.) meaning, they had no buildings or trees to cover them and shade them from the heat of the sun. Qatadah said, "It was mentioned to us that they were in a land where nothing grew, so when the sun rose they would go into tunnels until it had passed its zenith, then they would come out to go about their daily lives and earn themselves a living.''
كَذَلِكَ وَقَدْ أَحَطْنَا بِمَا لَدَيْهِ خُبْراً
(So (it was)! And We knew all about him.) Mujahid and As-Suddi said, "This means that Allah knew everything about him and his army, and nothing was hidden from Him, even though they came from so many different nations and lands. For,
(Truly, nothing is hidden from Allah, in the earth or in the heaven.)3:5''
Maududi - Sayyid Abul Ala Maududi - Tafhim al-Qur'an
That is, “When he advanced towards the East, conquering one country after the other, he reached a territory where the limits of the civilized world had come to an end and beyond which was the territory of barbaric people, who had no shelter at all of tents or buildings.”