An-Noor • EN-TAFISR-IBN-KATHIR
﴿ إِنَّمَا ٱلْمُؤْمِنُونَ ٱلَّذِينَ ءَامَنُوا۟ بِٱللَّهِ وَرَسُولِهِۦ وَإِذَا كَانُوا۟ مَعَهُۥ عَلَىٰٓ أَمْرٍۢ جَامِعٍۢ لَّمْ يَذْهَبُوا۟ حَتَّىٰ يَسْتَـْٔذِنُوهُ ۚ إِنَّ ٱلَّذِينَ يَسْتَـْٔذِنُونَكَ أُو۟لَٰٓئِكَ ٱلَّذِينَ يُؤْمِنُونَ بِٱللَّهِ وَرَسُولِهِۦ ۚ فَإِذَا ٱسْتَـْٔذَنُوكَ لِبَعْضِ شَأْنِهِمْ فَأْذَن لِّمَن شِئْتَ مِنْهُمْ وَٱسْتَغْفِرْ لَهُمُ ٱللَّهَ ۚ إِنَّ ٱللَّهَ غَفُورٌۭ رَّحِيمٌۭ ﴾
“[TRUE BELIEVERS are only they who have attained to faith in God and His Apostle, and who, whenever they are [engaged] with him upon a matter of concern to the whole community do not depart [from whatever has been decided upon] unless they have sought [and obtained] his leave. Verily, those who [do not abstain from the agreed upon action unless they] ask leave of thee - it is [only] they who [truly] believe in God and His Apostle! Hence, when they ask leave of thee for some [valid] reason of their own, grant thou this leave to whomsoever of them thou choose [to grant it], and ask God to forgive them: for, behold, God is much-forgiving, a dispenser of grace!”
Asking Permission to leave when They are doing something together This is another matter of etiquette to which Allah has guided His believing servants. Just as He commanded them to seek permission when entering, He also commanded them to seek permission when leaving, especially when they are doing something together with the Messenger ﷺ, such as the Friday, `Id, or congregational prayers, or a meeting for the purpose of consultation and so on. Allah commanded them not to leave him in these situations until they had asked his permission. If they did this, then they were of the true believers. Then Allah commanded His Messenger to give permission when someone asked for it, if he wanted to. He said: فَأْذَن لِّمَن شِئْتَ مِنْهُمْ وَاسْتَغْفِرْ لَهُمُ اللَّهَ (give permission to whom you will of them, and ask Allah for their forgiveness.)Abu Dawud reported that Abu Hurayrah said, "The Messenger of Allah ﷺ said: «إِذَا انْتَهَى أَحَدُكُمْ إِلَى الْمَجْلِسِ فَلْيُسَلِّمْ، فَإِذَا أَرَادَ أَنْ يَقُومَ فَلْيُسَلِّمْ، فَلَيْسَتِ الْأُولَى بِأَحَقَّ مِنَ الْآخِرَةِ» (When any of you joins a gathering, let him say Salam, and when he wants to leave, let him say Salam. The former is not more important than the latter.) This was also recorded by At-Tirmidhi and An-Nasa'i; At-Tirmidhi said: "It is a Hasan Hadith."