"This very night you will all fall away on account of me ...'" (Matthew 26:31)

When they had sung a hymn, they went out to the Mount of Olives. Then Jesus told them, "This very night you will all fall away on account of me, for it is written: " 'I will strike the shepherd, and the sheep of the flock will be scattered.' "This very night you will all fall away on account of me, for it is written: 'I will strike the shepherd, and the sheep of the flock will be scattered.'" (Matthew 26:30-31)
Jesus is predicting that his disciples will abandon him as he gets arrested and tried.

Why was Jesus arrested?

The temple High Priests and the Roman government worked in tandem to eliminate Jesus and his growing movement. The temple priests saw Jesus' teachings as threatening the stability of their organization. The Romans wanted the status quo so they could continue collecting their taxes.

The temple priests were worried that Jesus' movement would steal parishioners away from their temples. Their lifestyles were dependent on the tithings of these parishioners or forced collections of widows' inheritances as confirmed in Mark 12:40. Jesus' gaining movement threatened this system.

The Romans cooperated with the temple priests for the purpose of keeping the society in check. They occupied the region and collected taxes from the people to maintain their excessive lifestyles in Rome.

Scholarly sources indicate that the temple priests brought their concerns about Jesus' teachings before Pontius Pilate, who was the magistrate or prefect of Judea, in charge of governing the region. Pilate's responsibility was to keep the occupied state peaceful and producing income for the Romans.

Thus Pilate needed to support the priests' concerns about Jesus to avoid a Jewish uprising (which did occur a couple of decades later).

So there was a lot of pressure put upon Jesus' followers by the temple officials, supported by the Roman officials. With Jesus' arrest, many of his disciples ran off to avoid their own arrest. That is, with the exception of the devoted Mary Magdalene, who sat under Jesus' cross during his torture.

Why does Jesus quote Zechariah?

Jesus utilizes a part of a verse from Zechariah 13:7 in his statement. Some have misconstrued that this means Zechariah was predicting Jesus' arrest and subsequent murder at the hands of the Romans and temple high priests.

But this is not consistent with the rest of Zechariah's scroll. Rather, Zechariah's text describes a tumultuous event that has nothing to do with Jesus being arrested. We can easily see this from the verses surrounding Zechariah 13:7:
"On that day every prophet will be ashamed of his prophetic vision. He will not put on a prophet's garment of hair in order to deceive. He will say, 'I am not a prophet. I am a farmer; the land has been my livelihood since my youth.' If someone asks him, 'What are these wounds on your body?' he will answer, 'The wounds I was given at the house of my friends.' "Awake, O sword, against my shepherd, against the man who is close to me!" declares the LORD Almighty. "Strike the shepherd, and the sheep will be scattered, and I will turn my hand against the little ones. In the whole land," declares the LORD, "two-thirds will be struck down and perish; yet one-third will be left in it. This third I will bring into the fire; I will refine them like silver and test them like gold. They will call on My Name and I will answer them; I will say, 'They are my people,' and they will say, 'The LORD is our God.'" (Zech. 13:4-9)
The details of the violent calamity are described in verses just preceding these:
"I [God speaking] am going to make Jerusalem a cup that sends all the surrounding peoples reeling. Judah will be besieged as well as Jerusalem." (Zech. 12:2)
"On that day I will make the leaders of Judah like a firepot in a woodpile, like a flaming torch among sheaves. They will consume right and left all the surrounding peoples, but Jerusalem will remain intact in her place." (Zech. 12:6)
These are not the events that occurred when Jesus was arrested and tried. Rather, Zechariah is describing a violent overthrow of the kingdom of Judah that was to occur in future years - before the arrival of Jesus.

Zechariah lived in the Sixth Century BCE. During this century, Nebuchadnezzar and Nebuchadnezzar II attacked and pillaged Jerusalem and Judah multiple times. Following these, many of their inhabitants fled to surrounding regions. Jerusalem and Judah were also attacked by Artaxerxes III in 350 BCE. He arrested and killed many Jews, and imprisoned many.

In all, Jerusalem was attacked or besieged at least 75 different times over the centuries. It has been completely burnt down at least twice. It has undergone a change of rule at least 44 times. Judah has also undergone many sieges, often at the same time.

Zechariah was not predicting Jesus' arrest and trial in those verses.

Why did Jesus use Zechariah's verse then? 

Jesus was illustrating, using scripture, one of the tests the Supreme Being puts in front of those (such as Jesus' followers) who begin their path towards resuming their relationship with Him.

Each of us has choices to make with our lives. These choices determine whether we return to our relationship with God or not. Those who begin their journey are often tested.

Testing our dedication is necessary for our spiritual growth. Testing, in fact, is common amongst most relationships. When a man decides to have a relationship with a woman, he is often tested with options to go out with other women. His resisting those tests provide part of the glue of his relationship with the woman.

Now consider if a man and a woman have a long-term relationship, and the man runs off with another woman. After a couple of years, the man comes back to the woman, asking for her forgiveness and if he can return to their relationship. Will the woman drop everything and embrace him as she had before?

Not likely. The woman will most likely, assuming she wants to resume their relationship at all, go slowly. She wants to see how serious he really is. This 'going slowly' serves as the first test, because if the man isn't serious, he'll get frustrated and run off again.

Does God test us?

The Supreme Being also tests someone asking to return to Him - especially after we abandoned Him as we have done in our past. He will also go slowly, in addition to putting in front of us numerous tests.

Because the Supreme Being also happens to control everything, He designs challenges that specifically test (and reveal) our unique weaknesses. This is designed to increase our sincerity. And should we fail a type of test, we'll likely be retested.

These tests are for our benefit. It isn't that He needs to test us. We need those tests in order to know where we are and how far we have to go.

In the beginning, such tests will be fairly basic. As we progress, the tests become more difficult. The tests perfectly reflect our individual level of advancement and particular weaknesses.

Even when we fail a test, God never gives up on us. The tests reveal our own weaknesses, which allow us to grow and become spiritually stronger. This is what occurred amongst Jesus' followers. They were tested, and most did not pass. Yet both Jesus and God forgave them, and they each learned a great lesson.

Did Jesus teach that he would die for our sins?

Despite the glossing over of Jesus' teachings by some doctrines, we can see that Jesus oversaw the development of his followers' spiritual growth by maintaining disciplined devotional practices. This is indicated throughout the books of the new testament, and evidenced by the description of what Jesus and his disciples did after the "last supper" as quoted above:
When they had sung a hymn, they went out to the Mount of Olives. (Matthew 26:30)
What does "sung a hymn" mean? It means they devoutly practiced praising God and His Holy Names after dinner. This wasn't a weekly ceremony. This was a continual devotional regimen. And this was what Jesus' taught and practiced - consistent with the teachings of the ancient "prophets" - in order to bring about a change of consciousness amongst his students.

This thesis of "Jesus died for my sins" bypasses the process of changing our hearts. This was formulated by Paul and later embraced by the Romans because it made joining the church attractive for those who didn't want to do the hard work. It was a strategy to gain followers by making it easier to think we are saved.

The unfortunate part of this teaching is that it dissuades us from seeking a change of heart - from self-centeredness to God-centeredness.

Jesus never taught that all we have to do is wait until his body died on the cross and acknowledge that he died for our sins and then we are saved. He taught his students to change their consciousness from being servants of "mammon" to loving servants of God:
"No servant can serve two masters. Either he will hate the one and love the other, or he will be devoted to the one and despise the other. You cannot serve both God and mammon." (Luke 16:9)
It is not easy to change. One must undergo significant devotional work and await gradual change to adjust our consciousness from lovers of materialism ("mammon") to lovers of God.

It is way easier to continue our self-centered behavior, and go to church every Sunday and make a proclamation that "Jesus died for my sins." This formula was a great strategy for collecting followers back then, and it still is today.

Jesus taught that we need to change from being servants of materialism ("mammon") to becoming loving servants of God. It means doing the hard work to change our consciousness.

This means being tested. It means humbly getting back up and dusting ourselves off when we fail our tests - just as Jesus' disciples did - and continuing the devotional progress, in order to change our hearts from self-centeredness to loving God and His children:
“‘Love the Lord your God with all your heart and with all your soul and with all your mind.' This is the first and greatest commandment." (Matthew 22:37-38)