It was narrated from Ibn 'Abbas that the Messenger of Allah ﷺ stayed in Makkah for fifteen nights during the year of the Conquest, (during which time) he shortened his prayer.
The act of shortening prayers is known as Qasr which means reducing the number of rak'ahs from four to two when travelling or staying somewhere temporarily. This was done by Prophet Muhammad during his stay in Makkah so it serves as an example for us on how we should conduct ourselves while travelling or staying somewhere temporarily.