No one knows. Jesus’ reasons for delay are not explained here. We can only surmise that a higher purpose-higher than saving people from physical death-caused Jesus not to go with immediate haste to His friend’s side. That purpose was surely the one that Jesus had come to fulfill: saving people from spiritual death, that is, from eternal separation from His loving heavenly Father.
Though Lazarus was raised miraculously, he did die later. So did Mary and Martha, the disciples, and all of Jesus’ closet friends. Jesus did not come to spare His loved ones the experience of physical death but to show them the path to eternal life.
JOHN 11:4-6 – 4 When Jesus heard that, he said, This sickness is not unto death, but for the glory of God, that the Son of God might be glorified thereby.
5 Now Jesus loved Martha, and her sister, and Lazarus.
6 When he had heard therefore that he was sick, he abode two days still in the same place where he was.