Jesus wept at the death of Lazarus because He was moved with compassion. He was, basically, in all points tempted like as we are. He feels what we feel. We have not a High Priest who cannot be touched with our infirmities (Heb. 4:15).
He was weeping with those who weep. He wasn’t weeping because of the end of Lazarus, because the end of Lazarus was going to be resurrection. He was weeping because of the sorrow of Mary and Martha. This is the empathy, the sympathy, the tenderness, the kindness of Christ manifesting itself in that setting.