The Messenger of Allah ﷺ, whenever he went out on the day of Eid, would order that a spear be set up in front of him. He would then pray facing it with the people behind him. He used to do this while traveling, and from that practice the rulers adopted it.
أن رسول الله ﷺ كان إذا خرج يوم العيد أمر بالحربة فتوضع بين يديه فيصلي إليها والناس وراءه، وكان يفعل ذلك في السفر، فمن ثم اتخذها الأمراء.
Bukhari related it in the Book of Prayer (494), and Muslim in the Book of Prayer (501), both through the route of Abdullah bin Numayr, who said, Ubaydullah narrated to us, from Nafi, from Ibn Umar, and he mentioned it.Some abbreviated it by saying, "The Prophet ﷺ would have a spear planted for him, and he would pray facing it." Bukhari related this (498) from Musaddad, who said, Yahya (Ibn Saeed) narrated to us, from Ubaydullah, with this wording. In Muslim's version, through the route of Muhammad bin Bishr, from Ubaydullah, "A small spear would be planted for him, and he would pray facing it," and in another version, "A small spear would be planted for him, and he would pray facing it."The harbah and the anazah are the same thing. The harbah, when it is short, is called an anazah. The anazah is like a spear, but its point is at its lower end, unlike a spear, whose point is at its upper end.