This was to fulfill the word of the prophet Isaiah: Lord, who has believed through our message? To whom is the arm of the Lord fully revealed?
References for John 12:38
Isaiah explains why they couldn't believe:
He made their eyes blind and closed their minds so that they might not see with their eyes, understand with their minds, and turn their lives around— and I would heal them.
References for John 12:40
Isaiah said these things because he saw Jesus' glory; he spoke about Jesus.