3 The Lord on the mount: much rather let us understand that the Lord on the mount is the Word on high. Accordingly, what was done on the mount does not, as it were, lie low, nor is to be cursorily passed by, but must be looked up to. He saw the multitude, knew them to be hungering, mercifully fed them: not only in virtue of His goodness, but also of His power. For what would mere goodness avail, where there was not bread with which to feed the hungry crowd? Did not power attend upon goodness, that crowd had remained fasting and hungry.
In short, the disciples also, who were with the Lord, and hungry, themselves wished to feed the multitudes, that they might not remain empty, but had not wherewithal to feed them. The Lord asked, whence they might buy bread to feed the multitude. And the Scripture says: “But this He said, proving him;” namely, the disciple Philip of whom He had asked; “for Himself knew what He would do.” Of what advantage then was it to prove him, unless to show the disciple's ignorance? And, perhaps, in showing the disciple's ignorance He signified something more.
This will appear, then, when the sacrament of the five loaves itself will begin to speak to us, and to intimate its meaning: for there we shall see why the Lord in this act wished to exhibit the disciple's ignorance, by asking what He Himself knew. For we sometimes ask what we do not know, that, being willing to hear, we may learn; sometimes we ask what we do know, wishing to learn whether he whom we ask also knows. The Lord knew both the one and the other; knew both what He asked, for He knew what Himself would do; and He also knew in like manner that Philip knew not this. Why then did He ask, but to show Philip's ignorance? And why He did this, we shall, as I have said, understand afterwards.
Source: Tractates on the Gospel of John (New Advent)