This is because the mass-transmitted Sunnah of the Messenger of Allah (may Allah bless him and grant him peace) establishes that, when travelling, he prayed only two rakʿahs for the midday, afternoon and night prayers. Likewise, when he led the people on the Farewell Pilgrimage, he led them in only two rakʿahs at Minā and elsewhere. Abū Bakr after him likewise prayed only two rakʿahs, as did ʿUmar after him. Anyone who reports that the Prophet (may Allah bless him and grant him peace) prayed four rakʿahs for the midday, afternoon or night prayer while travelling is mistaken. The hadith narrated from ʿĀʾishah concerning this is weak to begin with, quite apart from the distortion that has occurred in its wording.
The wording of the hadith is that she said to the Prophet (may Allah bless him and grant him peace):
“You did not fast, whereas I fasted? And you shortened the prayer, whereas I performed it in full?”
He replied: “You did right, ʿĀʾishah.”
Despite its weakness and the evidence establishing its falsity, this report was transmitted in a form stating that ʿĀʾishah reported that the Prophet (may Allah bless him and grant him peace) would both fast and refrain from fasting, and would both shorten the prayer and perform it in full. Some of the imams therefore thought that the hadith contained her report of both practices from the Messenger of Allah (may Allah bless him and grant him peace). This is discussed at length in its proper place.
The point here is that the Sunnah for a traveller is to pray two rakʿahs. The imams agree that this is preferable, apart from a less well-supported opinion of al-Shāfiʿī. Most of the imams regard it as disliked for a traveller to pray four rakʿahs. This is the position of Abū Hanīfah, Mālik and Ahmad, according to the more explicit of the two reports from Ahmad. Some of these scholars hold that praying four rakʿahs is not permissible