Then gathered the chief priests and the Pharisees a council, and said, What do we? for this man doeth many miracles.
If we let him thus alone, all men will believe on him: and the Romans shall come and take away both our place and nation.
And one of them, named Caiaphas, being the high priest that same year, said unto them, Ye know nothing at all,
Nor consider that it is expedient for us, that one man should die for the people, and that the whole nation perish not.
And this spake he not of himself: but being high priest that year, he prophesied that Jesus should die for that nation;
And not for that nation only, but that also he should gather together in one the children of God that were scattered abroad.
Then from that day forth they took counsel together for to put him to death.
Christ raised Lazarus from the dead, which alarmed the religious and political elite. Raising the dead was a distinctly messianic act, and the leaders were afraid that the majority of people would follow Jesus as the king and probably attempt to reestablish a Jewish kingdom. The Romans most certainly would come down like a ton of bricks on anything they considered a threat to their political hegemony. In the ancient world, where religion was public and political, this would mean that Jewish practices, such as temple worship, dietary laws, festivals and circumcision would have been abolished. The reign of the seleucid Antiochus Epiphanes and the disastrous aftermath of the Jewish revolts against the Romans bear ample witness that such fears were justified.
Caiaphas, the high priest at the time, spoke up, offering realistic political advice. By killing Jesus you would stop the popular movement. The author of John, however, interprets this as an unconscious prophecy of Jesus' true role.
John connects Caiaphas' ability to prophecy true prophecies with his role as high priest.
This is in keeping with how the high priesthood was understood in the Judeo-Hellenistic millieu, as the following quotes will show.
Photius, patriarch of Constantinople in the mid 9th century AD, compiled the Bibliotheca, reviews of a couple hundred books he had read. He provides many extracts, including one from the Roman historian Diodorus, quoting On the Egyptians, a work of ethnography by Hecataeus of Abdera, a member of Ptolemy I's court.
Authority over the people is regularly vested in whichever priest is regarded as superior to his colleagues in wisdom and virtue. They call this man high priest [archierea], and believe that he acts as messenger [angelon] to them of God's commandments. It is he, we are told, who in their assemblies and other gatherings announces what is ordained.
-Diodorus, Library of History, 40.3.
Josephus relates an incident involving the Hasmonean high priest and ruler John Hyrcanus.
Now a very surprising thing is related of this high priest Hyrcanus, how God came to discourse with him; for they say that on the very same day on which his sons fought with Antiochus Cyzicenus, he was alone in the temple, as high priest, offering incense, and heard a voice, that his sons had just then overcome Antiochus. And this he openly declared before all the multitude upon his coming out of the temple; and it accordingly proved true; and in this posture were the affairs of Hyrcanus.
-Josephus, Antiquities of the Jews, 13.10, 3.
Josephus also describes an earlier incident of prophecy which occuredwhen Alexander the Great fought at Tyre and Gaza. The high priest Jaddua, a vassal of Darius, was reluctant to aid Alexander. This naturally did not sit well with Alexander, who planned to march on Jerusalem and punish its inhabitants. Jaddua called for public penitence and supplication in hope that God would avert the approaching disaster.
Whereupon God warned him in a dream, which came upon him after he had offered sacrifice, that he should take courage, and adorn the city, and open the gates; that the rest should appear in white garments, but that he and the priests should meet the king in the habits proper to their order, without the dread of any ill consequences, which the providence of God would prevent. Upon which, when he rose from his sleep, he greatly rejoiced, and declared to all the warning he had received from God. According to which dream he acted entirely, and so waited for the coming of the king..
-Josephus, Antiquites, 11.8, 4.
Philo, the Jewish philosopher of Alexandria, says of high priests that they were also prophets.
The real genuine priest is at once also a prophet, having attained to the honor of being allowed to see the only true and living God, not more by reason of his birth than by reason of his virtue. And to a prophet there is nothing unknown, since he has within himself the sun of intelligence, and rays which are never overshadowed, in order to a most accurate comprehension of those things which are invisible to the outward senses, but intelligible to the intellect.
Philo, The Special Laws, 4.36.
In contrast with John description of Caiaphas prophesying, the above accounts are all positive, revolving around pious, virtuous high priests. This contrast shows how intertwined the idea of prophecy with the high priesthood was in John's time, that even a wicked high priest could make true prophecies.