Then he asks for help in facing this hatred when he says, I do not pray that you should take them out of the world, but that you should keep them from evil. First, he makes his prayer; secondly, he gives the reason for what he asks, they are not of the world.
He mentions two things in the first. He says he is not asking for one thing, which is that they be taken out of the world. But how can they be taken out of the world who are not of the world? We should say that they are not of the world as regards their affections, as we said before. But they are of the world by continuing to be physical...ly present in it, and in this way he does not want them to be taken out of the world. This is because they would be of benefit to the faithful whom they would bring to the faith: "Go into all the world and preach the gospel to the whole creation" (Mk 16:15).
He asks for something else, namely, that while they remain physically in the world the Father should keep them from evil, that is, worldly evil; for it is difficult for a person who lives among those who are bad to remain free from evil, especially since the entire world is set in evil: "When you pass through the waters I will be with you; and through the rivers, they shall not overwhelm you" (Is 43:2).
Source: Commentary on John