[Machine] The Messenger of Allah ﷺ used to, when he went out on the day of Eid, command for the war banner to be placed in front of him, and he would lead the prayer towards it while the people prayed behind him. And he used to do the same when traveling, so the leaders adopted this practice.
أَنَّ رَسُولَ اللهِ ﷺ كَانَ إِذَا خَرَجَ يَوْمَ الْعِيدِ أَمَرَ بِالْحَرْبَةِ فَتُوضَعُ بَيْنَ يَدَيْهِ فَيُصَلِّي إِلَيْهَا وَالنَّاسُ وَرَاءَهُ وَكَانَ يَفْعَلُ ذَلِكَ فِي السَّفَرِ فَمِنْ ثَمَّ اتَّخَذَهَا الْأُمَرَاءُ