Abstract
John's Gospel does not stick to a chronological narrative that Mark and the other Synoptics adhere to. In fact, the text often makes forward references that indicate it was intended to be read with knowledge of the whole story. One reason the author does this is to use particular events in a person's life to define their character.
John includes his purpose for writing the gospel very near the end of of the work:
Now Jesus did many other signs in the presence of the disciples, which are not written in this book; but these are written so that you may believe that Jesus is the Christ, the Son of God, and that by believing you may have life in his name.—John 20:30-31 (ESV)
It's entirely possible to read John without knowing the purpose of the book; it's an interesting account. But if you go back and re-read it with the purpose in mind, you'll begin to see that the whole gospel is structured to reinforce that theme. The verb "to believe" (πιστεύω <4100>) appears 98 times in John. Eusebius notes:
But, last of all, John, perceiving that the external facts had been made plain in the Gospel, being urged by his friends, and inspired by the Spirit, composed a spiritual Gospel. This is the account of Clement.
What I'm getting at is that John's gospel demands to be read, not once, but repeatedly. Unlike the synoptic gospels, which build their argument fairly linearly from start to finish, John builds his argument in a spiral. So passages like John 3:1-21 (the conversation with Nicodemus) become more meaningful in light of passages like John 21:15-19 (the conversation with Peter after the fish breakfast on the beach).
The specific passage mentioned are part of what is sometimes called the Book of Signs. Daniel B. Wallace notes:
The Book of Signs, though disclosing seven miracles, is best organized geographically. There are eight locales for the manifestation of the Son of God seen here. As Jesus enters a new locale, the twin themes of Gentile response and Jewish hostility to him increase.
According to Wallace's outline, John 11 is part of the section describing Jesus' third visit to Judea and Jerusalem. It ends with the most dramatic of Jesus' signs: the raising of Lazarus from the dead. In John 12, Jesus returns to Jerusalem for the last time and marks the beginning of the final section of the Book of Signs.
When looking at the text as written, the forward reference in John 11 seems odd as the referent is a mere chapter away. (In the Bible I have on my desk, John 11 starts on page 945 and John 12 starts on 946.) But thematically (and perhaps chronologically) there is a greater separation. It's even possible that these sections were intended to be read and contemplated on their own.
Regardless of how John is divided, the author seems to rely on particular incidents in people's lives to define their character. For instance, at the dinner where Jesus was anointed, we read:
But Judas Iscariot, one of his disciples (he who was about to betray him), said, “Why was this ointment not sold for three hundred denarii and given to the poor?” He said this, not because he cared about the poor, but because he was a thief, and having charge of the moneybag he used to help himself to what was put into it.—John 12:4-6 (ESV)
So Judas is defined by his betrayal of Jesus, Lazarus is defined by being raised by Jesus and Mary is defined by anointing Jesus. Jesus Himself, of course, is defined by being the Son of God.