One of the reasons I love the Gospel of John is because more than any of the other gospels John gives us glimpses into Jesus mind and back story.
John 13:1–17 (ESV) Now before the Feast of the Passover, when Jesus knew that his hour had come to depart out of this world to the Father, having loved his own who were in the world, he loved them to the end.
Did you catch how John shares Jesus thoughts? There is so much in this verse… Jesus knows this is the last week of his life. His hour has come to depart from this world to the Father, he is about to complete his mission and make atonement for the sins of the world.