He excludes someone when he says, I am not speaking of you all. First, he says there is an exception; secondly, he gives the reason for the exception (v 18). Thirdly, he tells why he said there was an exception (v 19). He does two things about the first: he mentions there is an exception; he answers an unspoken question.
He says there is an exception when he says, I am not speaking of you all. He is saying in effect: You will be blessed, but not all of you, because I am not speaking of you all when I say you will be blessed: "All the runners compete, but only one receives the prize" (1 Cor 9:...24). For there is one of you, that is, Judas, who will not be blessed, and he will not do these things.
According to Origen, our Lord did not say blessed are you, without qualification; but he added a condition, if you do them. And this is true for all of them, even Judas; for if Judas had done these things, he would have been blessed. So for Origen, Jesus is excluding Judas from his servants, "a servant is not greater than his master" (v 16). It was like saying: I say you are servants and apostles, but I am not speaking of you all: for Judas, since he was a servant of sin, was not a servant of the Divine Word, nor was he an apostle once the devil had entered into his heart.
Someone could say: Since Christ does not say that all are blessed or his apostles, then some member of his group might perish unexpectedly. Our Lord answers this saying, I know whom I have chosen. This was like saying: Those who have been chosen will not perish; but not all have been chosen. So, the one who will perish will be the one who has not been chosen, that is, Judas: "You did not choose me, but I chose you" (15:16).
This seems to conflict with his earlier statement: "Did I not choose you, the twelve?" (6:71). Therefore, since Judas was one of the twelve, it seems that he was chosen. I answer that one can be chosen in two ways. One is for a present righteousness; and Judas was chosen for this. The other is for final glory; and Judas was not chosen for this.
The reason there was an exception was so that the scripture may be fulfilled - not that scripture forced the event, but it did mention an event that would happen: "Everything written about me in the law of Moses and the prophets and the psalms must be fulfilled" (Lk 24:44); "Not an iota, nor a dot, will pass from the law until all is accomplished" (Mt 5:18). This scripture says: He who ate my bread has lifted his heel against me. This is another translation of what we have in the Psalm (41:9) as: "The man of my peace, in whom I trusted, who ate my bread, has greatly deceived me." The intimacy Judas had with Christ is shown when we read, he who ate my bread: for Judas, along with the other disciples, ate bread with Christ, even consecrated bread. Further, his malicious efforts against Christ are shown when it says, has lifted his heel against me; that is, he will try to crush me. And we do crush our enemies under our heel: "She shall crush your head, and you will lie in wait for her heel" (Gen 3:15). And so one is said to raise his heel against another when he tries to crush him. But Judas will not be able to do this, because I will be exalted by the very thing with which he wants to crush me: "And I, when am lifted up from the earth, will draw all things to myself" (12:32).
We have an example in this for ourselves: let us not be set back if we happen to suffer evil from those close to us or from the malicious, since we can remember the conduct of Judas who, in spite of having received unlimited goods, returned the contrary to his benefactor. Our Lord chose Judas, whom he knew would become an evil person, so that we could realize that there would be no human society which does not have some evil members: "As a lily among brambles, so is my love among maidens" (Song 2:2). And in one of his letters Augustine says: "I don't care to assume that my household is better than the group of the apostles." We can also understand from this that if a prelate receives someone into the Church, and this person becomes bad, the prelate should not be blamed. Look at Judas! Even though he was chosen by Christ he turned out to be a traitor. The same thing happened to Philip when he received Simon the magician: "Shall they repay good with evil, by making a snare to take my life?" (Jer 18:20); "A man's foes will be those of his own household" (Mt 10:36).
Source: Commentary on John