First of all, let’s get it that it was Judas Iscariot’s betrayal that started a series of events leading to Jesus’ death on the cross. So to speak, the direct consequence of Iscariot’s betrayal was the crucifixion of Jesus on the cross. However, Jesus knew about Judas Iscariot’s betrayal beforehand. Then why did He look on for Iscariot’s betrayal to happen?
It was not that Jesus was powerless to stop Iscariot; in fact, He had all the power to remove Iscariot and any other potential betrayer from existence, yet He allowed Himself to be betrayed and arrested. This is because:
Had it not been that Jesus was the all-knowing God, He would not have known that Judas Iscariot was going to betray him. In fact, the only way he would have known would have been the day Judas Iscariot would lead a band of soldiers to the Garden of Gethsemane to arrest Him. So though Jesus knew about the betrayal and even talked about it several times, for the most part, Jesus treated the matter as if He were an ordinary human being who had no knowledge of what was going to happen. He made the event run its course as it would have been if He never knew about it.
Though Judas Iscariot intended to betray Jesus for his own gains, God was going to turn things around for everyone’s benefit. For out of Judas Iscariot’s betrayal would proceed many events among which was the death of Jesus on the cross and His death would bring salvation to all mankind. So why should Jesus try to prevent the bad guy Iscariot if, after all, his evil intent would turn out to bring good results for all?
There were great packages at stake for Jesus Christ Himself in the end. That is, if He was betrayed and was killed, He would resurrect to become the resurrected Savior of all mankind, and He would be greatly glorified in heaven and on earth, and He would earn titles such as the Savior of the world, the firstborn from the dead – for He would be the first to resurrect from the dead never to die again, etc. So Jesus knew well that there were great gains at stake for Him and so He yielded to the betrayal, the suffering, and the death. It is written,
2 looking to Jesus, the founder and perfecter of our faith, who for the joy that was set before him endured the cross, despising the shame, and is seated at the right hand of the throne of God. (Hebrews 12:2 ESV)
Judas Iscariot’s evil intention to betray Jesus was in line with God’s perfect will that Jesus should die to redeem all humanity. Iscariot’s betrayal would set in motion a series of events that would, eventually, lead Jesus to His death and God’s perfect will would be fulfilled at last. Hence Jesus did nothing to avoid the betrayal and His arrest; He just looked on for it to happen.