(a) Awn bin Kahmas narrates from his father that he said: We stood up for the prayer at Mina, but the imam had not yet come out, so some of us sat down. A shaykh from the people of Kufah said to me: "What has made you sit?" I said: "Ibn Buraydah." The shaykh said to me: "Abd al-Rahman bin Awsajah narrated to me about this from Sayyiduna al-Bara' bin Azib (may Allah be pleased with him), who said: In the time of the Messenger of Allah (peace and blessings be upon him), we would stand in rows for the prayer for a long time before he said the takbir."
Sayyiduna al-Bara' bin Azib (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) said: "Indeed Allah Almighty sends down His mercy, and His angels pray, for those who are in the first row; and there is no step better in the sight of Allah, Exalted be His praise, than the step a person walks to join a row."
(b) Something similar has also been transmitted from Sayyiduna Ali (may Allah be pleased with him). It is transmitted from Abu Khalid al-Walibi that one day Ali bin Abi Talib (may Allah be pleased with him) came out to lead us in prayer while we were standing. He (may Allah be pleased with him) said: "What is the matter that I see you standing in a daze?"
(c) Ibrahim al-Nakha'i (may Allah have mercy on him) was asked whether they should wait for the imam standing or sitting. He said: "They should wait sitting."
What seems most likely is that the Companions (may Allah be pleased with them) used to stand up for the prayer before the Prophet (peace and blessings be upon him) came out, and would take their places before he took his place. Then he commanded them: "Do not stand until you see me." He (peace and blessings be upon him) gave this command to make things easier for them.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2285