Reading through John 11 recently, the following passage stuck out at me (John 11:1-15):
Jesus loved Lazarus, Mary and Martha. Yet rather than drop everything he was doing to rush to Lazarus or even to heal him from a distance like he did the son of the official from Capernaum (John 4:46-54), Jesus waited an additional two days before setting out for Bethany.
11:1 Now a certain man was ill, Lazarus of Bethany, the village of Mary and her sister Martha. 2 It was Mary who anointed the Lord with ointment and wiped his feet with her hair, whose brother Lazarus was ill. 3 So the sisters sent to him, saying, “Lord, he whom you love is ill.” 4 But when Jesus heard it he said, “This illness does not lead to death. It is for the glory of God, so that the Son of God may be glorified through it.”5 Now Jesus loved Martha and her sister and Lazarus. 6 So, when he heard that Lazarus  was ill, he stayed two days longer in the place where he was. 7 Then after this he said to the disciples, “Let us go to Judea again.” 8 The disciples said to him, “Rabbi, the Jews were just now seeking to stone you, and are you going there again?” 9 Jesus answered, “Are there not twelve hours in the day? If anyone walks in the day, he does not stumble, because he sees the light of this world. 10 But if anyone walks in the night, he stumbles, because the light is not in him.” 11 After saying these things, he said to them, “Our friend Lazarus has fallen asleep, but I go to awaken him.” 12 The disciples said to him, “Lord, if he has fallen asleep, he will recover.” 13 Now Jesus had spoken of his death, but they thought that he meant taking rest in sleep. 14 Then Jesus told them plainly, “Lazarus has died, 15 and for your sake I am glad that I was not there, so that you may believe. But let us go to him.”
Why the wait? The text above makes clear Jesus did this for the faith of his disciples, but we also can't escape the conclusion that Jesus's waiting in verse 6 in inextricably linked to his loving Lazarus in verse 5. Jesus wasn't just doing this for the faith of his traveling coterie of disciples or of those who would read this account in Scripture. Jesus did this for the benefit of Mary, Martha, and yes, even Lazarus.
Jesus could have healed Lazarus, but letting him die and raising him from the dead as a sign of his divine authority over death was the more loving thing to do.
Sure, it was painful to Lazarus, and more so to Mary and Martha, who were perplexed as to why Jesus took so long in arriving (see John 11:17-32). "Lord, if you had been here, my brother would not have died," Martha and then Mary separately complained to Jesus.
But it seems to me Jesus understood that merely delaying Lazarus's death would not have served Lazarus nor Mary and Martha.
Lazarus, God had determined by His sovereign plan, would glorify God by dying and then being raised again from the dead by Jesus, becoming a living, breathing demonstration of Jesus's claim of authority in John 5:19-29.
"I am the resurrection and the life," Jesus assured Martha. "Whoever believes in me, though he die, yet shall he live, and everyone who lives and believes in me shall never die," the Savior added, asking,, "Do you believe this?"
"Yes, Lord; I believe that you are the Christ, the Son of God, who is coming into the world," Martha responded, confessing Jesus as the Messiah.
Plenty of people can work to delay the sting of death. We have a whole medical industry dedicated to alleviating suffering and healing wounds towards that end. But no human agency can transcend or conquer death. Only God can, and that's precisely what Jesus was demonstrating by the raising of Lazarus. Jesus was the Messiah, the very Son of God. He not only has the power to raise the dead and give life, he is resurrection life personified.
And that, I think, is the loving lesson Jesus showed Martha, Mary, and Lazarus. The pain and suffering of this life is too light and momentary to expect that God must glorify Himself only through a display of His healing power.
Yes, it's well and good to pray and pray earnestly for God to heal people of all manner of sickness and disease and affliction.
However, God wants us first and foremost to trust in His Son Jesus, who IS the resurrection and the life and promises us eternal joy in a resurrected cosmos with Him.
"If in Christ we have hope in this life only, we are of all people most to be pitied," the Apostle Paul admonished the church at Corinth. But because Jesus went ahead of us in death and resurrection we can rest assured that God will likewise raise us to new life and glory in the Son [I Cor. 15:35-49]:
Sickness, death and mourning are sadly part of our lot in this fallen world, but praise be to God that in Christ, we have newness of life and the glorious hope of resurrection when He returns!35 But someone will ask, “How are the dead raised? With what kind of body do they come?” 36 You foolish person! What you sow does not come to life unless it dies. 37 And what you sow is not the body that is to be, but a bare kernel, perhaps of wheat or of some other grain. 38 But God gives it a body as he has chosen, and to each kind of seed its own body. 39 For not all flesh is the same, but there is one kind for humans, another for animals, another for birds, and another for fish. 40 There are heavenly bodies and earthly bodies, but the glory of the heavenly is of one kind, and the glory of the earthly is of another. 41 There is one glory of the sun, and another glory of the moon, and another glory of the stars; for star differs from star in glory.42 So is it with the resurrection of the dead. What is sown is perishable; what is raised is imperishable. 43 It is sown in dishonor; it is raised in glory. It is sown in weakness; it is raised in power. 44 It is sown a natural body; it is raised a spiritual body. If there is a natural body, there is also a spiritual body. 45 Thus it is written, “The first man Adam became a living being”;  the last Adam became a life-giving spirit. 46 But it is not the spiritual that is first but the natural, and then the spiritual. 47 The first man was from the earth, a man of dust; the second man is from heaven. 48 As was the man of dust, so also are those who are of the dust, and as is the man of heaven, so also are those who are of heaven. 49 Just as we have borne the image of the man of dust, we shall  also bear the image of the man of heaven.
Like Mary and Martha, we've no good reason to doubt our Lord when he tarries from answering our prayers. We know that He has His glory and our supreme joy in view.