
Abu Basīr the narrator says that he asked Abu Abdillah Imam Ja’far as-Sadiq (a.s.) for the reason why respect of mosques is obligatory? The Imam (a.s.) replied that it was because a mosque is the house of Allah on earth.
According to traditions Allah (swt) has said, ‘Mosques are My houses on the earth. How fortunate are those who perform Wudhu in My house and they visit Me in My house in a state of ritual purification. In these circumstances it is Wajib for the master of the house to honor the guests who visit him. In order to convey the good news of light (Nūr) that I will bestow on the day of Qiyāma upon those who leave their homes to go to the mosques in the darkness of the night.’
(Wasa’il ul-Shia)