The author , the great scholar of hadeeth (may Allah be pleased
with him) said in his Book, Riyaad as-Saaliheen, under the Book of Manners of Eating: “Chapter on What the Invited Person Should Say If Accompanied by Another Uninvited Person to the Invitation.”
He then mentioned the hadeeth of Aboo Mas’ud Al-Badri (may Allah be pleased with him) that a man invited the Prophet ﷺ to partake in a five-man feast. He had limited it to five persons. However, another man followed them making six. When the Prophet ﷺ got to the house of the host, he asked for permission regarding the sixth person, saying, “This person has followed us, you may wish to allow him in, and if you like, he will go back.” This contains proof for the lessons that follow:
Firstly: It is allowed for the individual to limit those he invites, there is no harm doing that. Some say, “Once he specifies a certain number, he is a miser; otherwise, why should he specify a number?!” However, it could be said that: the person only has little, he has to give a restriction so that he may just prepare food sufficient for the number especially in places where the generality of the people are poor. As for the well-to-do, they do not give restrictions – and praise be unto Allah.
It also contains proof that: a person may actually go along with those invited perhaps he finds some food considering the fact that the Prophet ﷺ did not prevent the man from following them. In fact, he helped him ask for permission. It also occurs in the hadeeth of Aboo Hurayrah – may Allah be pleased with him –, that he once followed the Prophet ﷺ perhaps he finds some food to eat.(1)
It also contains evidence that: If an uninvited person comes along with you, permission should be sought for him, especially if you notice that the host had invited you for a particular reason he would not want anyone to know about. In that case, you must ask for permission.
It also includes proof that: there is no blaming the host if he refuses to admit the individual that follows the invited guests for the reason
that if that involved any harm, the Prophet ﷺ would not have asked for permission. Hence, his seeking for permission for the man shows that it's a thing regarding which he may choose to either allow him or say that he should leave. This is for the reason that, if a person asks for permission from an individual, the owner of the house has a choice; he may admit the person if he wills, or say, "go back" if he so willed too. Allah the Exalted had said
"And if you are asked to go back, go back, for it is purer for you, and Allah is All-Knower of what you do." (an-Noor: 28)
So, bear no grudge or feel any bad when you ask for permission from a person and he says, "Please go back, I am busy." Contrariwise, when some people seek permission from a person, and he tells them, "go back; I am busy", he begins to hold a grudge. But this is wrong! Because people have private activities in their homes; they may even have private dealings with other persons much more important; so when you seek permission to enter the house, and he says to you, "I have some jobs now; kindly go back", you should accept it wholeheartedly and calmly; that is what the Sharee'ah has legislated.
Allah alone grants success.