Narrated Jabir bin `Abdullah: On the Day of `Id the Prophet used to return (after offering the `Id prayer) through a way different from that by which he went.
Related hadith on this topic
Explanation & Benefits
Maulana Dawood Raz
Hadith Commentary:
That is, the narration of the person who considers Sa‘id’s teacher to be Jabir (radi Allahu anhu) is more authentic than the one who considers Abu Hurairah (radi Allahu anhu) to be Sa‘id’s teacher.
This narration of Yunus has been connected (mawsul) by Isma‘il.
Going and returning by different routes is also not devoid of legal (shar‘i) benefits, the purpose of which, according to the scholars, is that the worshipper’s steps will fall on both routes for the worship of Allah, and the earth of both routes will bear witness for him before Allah (wallahu a‘lam).
Source: Sahih Bukhari: Commentary by Maulana Dawood Raz, Page: 986
Shaykh Abdul Sattar al-Hammad
Hadith Commentary:
Hafiz Ibn Hajar rahimahullah has mentioned more than twenty benefits of changing the route, among which a few are as follows:
➊ The might of Islam is demonstrated from every direction.
➋ Wherever the steps fall, those regions will bear witness on the Day of Judgment.
➌ Meeting and expressing sympathy with the people residing on both sides.
➍ In changing the route, a good omen is intended, because returning by the same route is as if one is undoing the previous action.
➎ The route was changed so as to remain safe from the evil eye of the Jews and hypocrites.
(Fath al-Bari: 2/609)
Source: Hidayat al-Qari: Commentary on Sahih Bukhari, Urdu, Page: 986