When Messenger of Allah ﷺ and his companions came to Mecca, the pagans circulated the news that a group of people were coming to them and they had been weakened by the Fever of Yathrib (Medina). So the Prophet ordered his companions to do Ramal in the first three rounds of Tawaf of the Kaʿba and to walk between the two corners (The Black Stone and Yemenite corner). The Prophet ﷺ did not order them to do Ramal in all the rounds of Tawaf out of pity for them.
قَدِمَ رَسُولُ اللَّهِ ﷺ وَأَصْحَابُهُ فَقَالَ الْمُشْرِكُونَ إِنَّهُ يَقْدَمُ عَلَيْكُمْ وَقَدْ وَهَنَهُمْ حُمَّى يَثْرِبَ فَأَمَرَهُمُ النَّبِيُّ ﷺ أَنْ يَرْمُلُوا الأَشْوَاطَ الثَّلاَثَةَ وَأَنْ يَمْشُوا مَا بَيْنَ الرُّكْنَيْنِ وَلَمْ يَمْنَعْهُ أَنْ يَأْمُرَهُمْ أَنْ يَرْمُلُوا الأَشْوَاطَ كُلَّهَا إِلاَّ الإِبْقَاءُ عَلَيْهِمْ