Near the end of Jesus’s ministry, he came to the town of Bethany where his friend Lazarus had recently died. The dead man’s sister Mary said to Jesus, “Lord, if you had been here, my brother would not have died” (John 11:32).
A few months later, Jesus is back in Bethany for a dinner in his honor, with the risen Lazarus sitting next to him. Mary pours out an enormously expensive jar of perfume on Jesus’s feet. When Judas gets upset at the “waste,” Jesus explains that Mary did this to prepare Jesus for his burial (John 12:1-7; cf. Matt 12:6-13).
Putting things together, you see that (1) Mary knew Jesus had the power to prevent Lazarus from dying; (2) Mary knew that the religious leaders wanted to kill Jesus because he raised Lazarus from the dead (John 11:45-57); (3) Mary knew that Jesus was going to die.
It seems reasonable to think that if Mary knew that Jesus could keep Lazarus from dying because of illness, she believed that Jesus could keep himself alive by avoiding Jerusalem. Mary knew that Jesus did not come to avoid death, but to endure it.
On the one hand, it should not be surprising that Mary understood a truth that Jesus repeated many times to his disciples (e.g., Mark 8:31; 9:31; 10:33-34). On the other hand, none of the apostles seemed to understand, judging from the way they responded to his arrest, trial, and crucifixion. Even after his resurrection, two of his disciples were distraught because they believed Jesus was a failure because he had been killed (Luke 24:17-18).
Mary not only understood, but she believed, pouring ointment upon Jesus that cost the equivalent of one year’s wages. Perhaps we haven’t given her enough credit.