The author, may Allah shower blessings on him, said: The chapter on undesirability of leaving the mosque without offering salat after the Adhaan has been proclaimed except for a reason.
This is because when the Muadhin calls to Prayer, he will say: Hayya alaa Salaah; that is, hasten to Prayer. It is an act of disobedience to leave the mosque after the Adhaan has been proclaimed. This is because one has been told to advance but he does the opposite.
Then he (may Allah shower blessings on him) mentioned the hadeeth of Abu Sha'thaa' (may Allah shower blessings on him). He reported that they were sitting with Abu Hurairah (may Allah be pleased with him) and a man stood up to leave the mosque. Abu Hurairah (may Allah be pleased with him) followed him with his gaze until he went out of the mosque. Abu Hurairah (may Allah be pleased with him) said: 'Indeed, this man has disobeyed the Abu Al-Qaasim [the Prophet ﷺ]'. He was staring at him to see if he was moving to another part of the mosque or he wanted to get something. But after his exit, it became clear to him that he was leaving the mosque. He (may Allah be pleased with him) then said: 'Indeed, this man has disobeyed Abu Al-Qaasim i.e. the Messenger of Allah ﷺ'.
When a companion says: 'He has disobeyed Abu Al-Qaasim', the ruling is Marfoo1; that is, it is similar to the Prophet ﷺ stating that such act is prohibited.
From this hadeeth, some scholars deduced that it is forbidden for the one who has an obligation to observe Salat in the mosque to leave after the pronouncement of Adhaan except for a valid excuse. Some of the valid excuses are leaving to urinate, defecate, pass wind, perform ablution, an affliction which necessitates leaving hits him or he is the Imam or Muadhin for another mosque.
But if he leaves the mosque in order to observe Prayer in another mosque, there is a reason to hold back. Someone may opine that this
hadeeth is general while another person may opine that it is regarding a person who left the mosque in order not to observe Prayer with the congregation. Thus, whosoever goes out of a mosque so as to observe Prayer in another mosque has not fled from the congregational Prayer. Rather, he wants to observe Prayer in another mosque. Nevertheless, one should not leave the mosque even if one wants to pray in another mosque except for a valid reason. For example, if there is Funeral Prayer which he would want to join in another mosque, he wishes to observe Prayer in another mosque with better recital or similar valid reasons. In this case, we say that there is no blame on him if he leaves.
Allah alone grants success.