1502 He shows his own attitude towards this death, saying, and for your sake I am glad that I was not there, so that you may believe. This can be explained in two ways.
The first way is this. We have heard that Lazarus was sick. And although I was not there I have told you that he has died and for your sake I am glad, i.e., because it is for your benefit, so that you may experience my divinity, because even though I was not there I saw all this: "All are open and laid bare to the eyes of him with whom we have do to" (Heb 4:13). This is not surprising, because the divinity is present to all th...ings: "Do I not fill heaven and earth?" (Jer 23:24). So that you may believe not as though they were to believe for the first time, but in order that they might believe more firmly and more strongly, in the sense of "I believe; help my unbelief" (Mk 9:23).
The other explanation is this: I am glad that he is dead and this is for your sake, for our benefit, so that you may believe. Accordingly, I am glad that I was not there, for if I had been there, he would not have died. But because he is now dead, it will be a greater miracle when I raise one already decomposing. As a result, your faith will be get stronger, for it is greater to raise one who is dead than to keep him from dying.
We can learn from this that evils are sometimes a reason for joy, insofar as they are directed to some good: "We know that everything works for good with those who love him" (Rom 8:28).
1503 He mentions his plan to go when he says, but let us go to him. Here we see God's mercy, for in his mercy he takes the initiative and draws to himself those living in sin, who are dead and unable of themselves to come to him: "I have loved you with an everlasting love; therefore have I drawn you, taking pity on you" (Jer 31:3).
Source: Commentary on John