Jesus went down to the graveyard for the same reason David went down into the Valley of Elah: To kill a giant and slay a dragon.
Jesus went to confront an enemy who had defied the ranks of his people and destroyed his friends.
Life went to wage war on Death.
As Calvin put it:
Christ does not come to the sepulcher as an idle spectator, but as a wrestler preparing for a contest; and therefore we need not wonder that he groans again; for the violent tyranny of death, which he had to conquer, is placed before his eyes. (Calvin on John 11:38)
As Ridderbos explains, although Jesus shared in the grief of Lazarus’ sisters and their friends, we learn that
he, as the One sent by the Father, was moved to resist the demonstration of human impotence in the face of death as though it had the last, decisive word in the world. To break this spell he strides to the tomb, not in the sovereign apathy of the great Outsider, but as the One sent into the world by the Father, as the Advocate who has entered human flesh and blood. Accordingly, it is not only from his divine authority but also from his deep human involvement in the death of his friend that, at sight of the large stone that is intended to close off Lazarus’s tomb forever, is evoked from him the measured, almost gruff command to the bystanders: “Take away the stone.” It is as if in these words a kind of tension is being released. Enough now of tears and wailing! Enough honor has been bestowed on death! Against the power of death God’s glory will now enter the arena! (Ridderbos, The Gospel of John: A Theological Commentary, pp 403-404)
Jesus is the resurrection and the life, the true and better death eater.