Caiaphas did not think of this himself. He was high priest that year. So he was really prophesying that Jesus would die for the Jewish nation