It is sometimes said that the crowd did not understand Jesus and this is why they became angry and shouted "crucify!" It is said that people thought he was a specific type of leader or king or messiah and when it turned out he was not, the crowd became angry.
Perhaps the crowd shouted for Jesus to die not because they misunderstood Jesus, but because Jesus understood the crowd.
It is the case that tension in the world needs to be resolved and one of the most universally accepted ways to resolve tension is to locate, isolate and destroy a scapegoat. Jesus knows this and Jesus also knows this cycle of tension, blame and death is a cycle that no one has been able to break. But Jesus thinks he might have a way to break the cycle, as long as the disciples don't screw it up.
Here is part of the story from Luke:
He said to them, “When I sent you out without a purse, bag, or sandals, did you lack anything?” They said, “No, not a thing.” He said to them, “But now, the one who has a purse must take it, and likewise a bag. And the one who has no sword must sell his cloak and buy one. For I tell you, this scripture must be fulfilled in me, ‘And he was counted among the lawless’; and indeed what is written about me is being fulfilled.” They said, “Lord, look, here are two swords.” He replied, “It is enough.”
Why would Jesus ask for a sword? Jesus needs the Powers That Be to count him as an insurrectionist and a rebel leading an armed revolt, so he asks for a sword. Jesus does not plan to use it all he needs is a prop to ensure that the crowd thinks he is dangerous. This points out the fact that while Jesus never intends to use the sword nor has he been violent at all, people will make "evidence" even when there is not any to be had. Jesus works to ensure that people will make evidence, because he is without fault.
But why does Jesus want the Power That Be to find fault with him? So that Jesus becomes a scapegoat. Jesus knows that in order to break the scapegoat cycle, he must enter into the cycle in the place of the scapegoat.
What Jesus does not need is for the Disciples to screw this up. There have been other times when people were able to kill Jesus but it was not "his time". The full force of the scapegoat cycle had not reached a breaking point. But now it has. Jesus cannot have the Disciples screw up all this work and time. Jesus cannot have the Disciples screwing it up by becoming the scapegoat instead of Jesus. So Jesus asks his disciples to pray that they will not come into the time of trial.
He came out and went, as was his custom, to the Mount of Olives; and the disciples followed him. When he reached the place, he said to them, “Pray that you may not come into the time of trial.” Then he withdrew from them about a stone’s throw, knelt down, and prayed,“Father, if you are willing, remove this cup from me; yet, not my will but yours be done.” Then an angel from heaven appeared to him and gave him strength. In his anguish he prayed more earnestly, and his sweat became like great drops of blood falling down on the ground. When he got up from prayer, he came to the disciples and found them sleeping because of grief, and he said to them, “Why are you sleeping? Get up and pray that you may not come into the time of trial.”
Now that the disciples have failed again in their work, Jesus is nervous that they might screw this thing up again. How will they act when the crowd comes? If they piss off the crowd then they will become the scapegoat and they will just become like one of the million of other past scapegoats unable to break the cycle. Jesus knows what to do and how to do it, but he cannot have the Disciples screw this up.
And they almost do.
While he was still speaking, suddenly a crowd came, and the one called Judas, one of the twelve, was leading them. He approached Jesus to kiss him; but Jesus said to him, “Judas, is it with a kiss that you are betraying the Son of Man?” When those who were around him saw what was coming, they asked, “Lord, should we strike with the sword?” Then one of them struck the slave of the high priest and cut off his right ear.But Jesus said, “No more of this!” And he touched his ear and healed him. Then Jesus said to the chief priests, the officers of the temple police, and the elders who had come for him, “Have you come out with swords and clubs as if I were a bandit? When I was with you day after day in the temple, you did not lay hands on me. But this is your hour, and the power of darkness!”
When the ear is cut off there is a potential that the crowd would take the Disciple and kill him as a scapegoat to the tension. Jesus has to redirect the crowd away from the Disciple and back to himself. So he heals the high priest and then shouts to the crowd, "Hey! you never came to get me in the open, now you come at night! You all are cowards and jerks! I am Jesus. I am the one you want."
And so the wrath of the crowd turns back to Jesus, the last and Ultimate scapegoat.
And Jesus did not screw it up.