This is because of an Islamic ruling that the place of Imam of congregation prayers should not be higher than prayers behind him. This rule is derived from several Ahadeeth in the reputable hadith collection book Wasā'il al-Shīʿa vol. 5 page 463.
The standing place of the Imam compared to that of the Ma'miim should
not be higher than the span of four closed fingers. But the place
where the followers stand could be higher than that of the Imam. Of
course, the height must be reasonable enough to maintain the
appearance of Salat al-Jama'at.
Sometimes there are a high population for congregation prayers and so people stand in yard and streets and this is to ensure Imam is not higher than others.
If you mean the philosophy or purpose of God for setting this rule, it is not mentioned or at least I could not find it with a reputable reference. Some scholars say it is to prevent pride in Imam. Same as recommendation of Islam for saying Salam from who is riding to who is walking.
References:
Congregation Prayer > The Arrangement of Salat al-Jamaat
Why the place of Imam is higher in Congregation prayer?