Every plot needs a bad guy and Judas seemed ripe for the spot. He had too many temptations and he wasn’t up to the challenge.
He was the treasurer for the group. All the money ciphered through his hands. According to John, Judas stole from it.
Then in Matthew 26, Jesus announces to the disciples that he will be handed over to be crucified. The head priest gathers a group together with [plans to do just this. Suddenly, a few verses down, we see Judas offering his services to them. He will identify Jesus to them for 30 pieces of silver.
Frankly all of this seems odd. Everyone knows who Jesus is. One wonders why he must be pointed out. However, Judas does fulfill the prophecy that the Messiah would be betrayed and handed over.
He had to be betrayed so the crucifixion could follow. Some might even say that Judas did a good deed on behalf of all mankind!
But remember this. God gives us the terrifying responsibility of the freedom of choice.
Then the Lord said to Cain, “Why are you angry? Why is your face downcast? If you do what is right, will you not be accepted? But if you do not do what is right, sin is crouching at your door; it desires to have you, but you must rule over it.” (Genesis 4:6-7)
The point is that for about 4 months wages, Judas gave Jesus up to the authorities, That’s about 3-400 dollars in today’s money. Who have you betrayed for less than that? Betrayed a friend to be the first with gossip or slander, betrayed to get a better job? Betrayed for a better social place?