John briefly stops telling about the events in the story in order to explain why Jesus asked Philip where to buy bread. (See: [[rc://en/ta/man/jit/writing-background]])
The reflexive pronoun "himself" makes it clear that the word "he" refers to Jesus. Jesus knew what he would do. (See: [[rc://en/ta/man/jit/figs-rpronouns]])