Remember that Jesus has spoken of this before, such as when the pharisees asked why the disciples didn’t fast, saying, “when the bridegroom leaves, then they will fast.” But here, Jesus says it is expedient that he leave. Why expedient? Wouldn’t they cling to Him if He remained? But He has given them a commission. As His leaving would move them to sadness, He promises to sent the paraclete. Here’s what Augustine says about this passage:
This He says not on account of any inequality between the Word of God and the Holy Ghost, but because the presence of the Son of man amongst them would impede the coming of the latter. For the Holy Ghost did not humble Himself as did the Son, by taking upon Him the form of a servant. It was necessary therefore that the form of the servant should be removed from their eyes; for so long as they looked upon that, they thought that Christ was no more than what they saw Him to be. So it follows: But if I depart, I will send Him unto you. But could He not send Him while here: Him Who, we know, came and abode on Him at His baptism, yea Him from Whom we know He never could be separated? What means then, If I go not away, the Comforter will not come to you, but, you cannot receive the Spirit, so long as you know Christ according to the flesh? Christ departing in the body, not the Holy Ghost only, but the Father, and the Son also came spiritually.