O people, I have lost such-and-such of mine—has anyone found it?
Such an announcement is impermissible in the mosque; it is forbidden, because mosques were not built for this purpose. The Prophet, peace and blessings be upon him, said: “If you hear someone calling out for his lost animal in the mosque, say to him, ‘May Allah not return it to you, for the mosques were not built for this.’”
We are therefore commanded to invoke that supplication against him, saying, “May Allah not restore it to you.” And if we hear someone buying or selling inside the mosque, we likewise say, “May Allah never grant your trade any profit,” for mosques were not erected for commerce.
All the commands issued by the Prophet ﷺ are pure good, and everything he forbade is pure evil. The fundamental rule of his Sharia is to enjoin benefits and prevent harms. When a matter involves both harm and benefit, the stronger and more prevalent of the two is given precedence: if the benefit outweighs the harm, the benefit prevails; if the harm outweighs the benefit, the harm prevails; and if they are equal, the harm is preferred, for warding off harm takes priority over procuring benefit. Allah is the Grantor of success.
May Allah’s blessings, peace, and grace be upon our Prophet Muhammad, upon his family, his Companions, and all who follow them with excellence until the Day of Judgment.