“When the Prophet (ﷺ) prayed on the day of ‘Eid or on another occasion, a small spear was set up in front of him, and he prayed facing it, and the people were behind him.”

Nafi` said: It is from here that the leaders have taken this practice.
Sunan Ibn Majah Book 5, Hadith 503