As for his command, the Prophet ﷺ said: “When any one of you prays, let him pray facing a sutrah, even if it is an arrow.” (1)
As for his practice, during his journeys a short spear would be planted for the Prophet ﷺ, and he would pray facing it. (2)
The wisdom behind the sutrah is as follows:
First: it prevents a person’s prayer from being diminished—or invalidated—if someone passes beyond it.
Second: it shields the worshipper’s gaze, especially when it is an upright object—that is, something with physical substance—for it helps the worshipper to be present in heart and to restrain his gaze.
Third: it entails complying with the Prophet’s ﷺ command and following his guidance. Everything that involves obeying Allah and His Messenger, or following the Messenger’s ﷺ guidance, is good.
His statement, “It is recommended to pray facing a sutrah,” apparently applies whether one is travelling or resident, and whether one fears that someone may pass in front of him or does not fear this, because of the general nature of the evidence on the matter.
Some scholars said that if he does not fear that someone will pass in front of him, it is not recommended