Sayyiduna Abu Hurairah (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said that when the time for prayer comes and you do not find any place except the enclosures of goats and camels (their sitting places), then perform prayer in the enclosure of goats, but do not perform prayer in the enclosure of camels.
Hadith Referenceسنن دارمي / من كتاب الصللاة / 1429
The rulings of the Shari’ah are filled with wisdom and benefit.
In the aforementioned hadith, permission has been granted to pray in a sheepfold when there is no space, while praying in a camel enclosure has been prohibited. This is because there is no fear of harm from sheep, whereas if a camel becomes agitated, there is a risk not only of injury but even of loss of life. And in the Noble Qur’an, the principle has also been stated: «﴿وَلَاتُلْقُوابِأَيْدِيكُمْإِلَىالتَّهْلُكَةِ﴾ [البقرة : 195]» “Do not throw yourselves into destruction with your own hands.”
How admirable is this true Shari’ah, every command and every prohibition of which is full of wisdom.