Jesus felt compassion for the friends of Lazarus.
John 11:4 (NASB)
But when Jesus heard this, He said, “This sickness is not to end in death, but for the glory of God, so that the Son of God may be glorified by it.”
Jesus deliberately waited two extra days after Lazarus’s sisters sent for him.
Why? Presumably because he knew what that he was going to raise Lazarus from the dead. So why did he weep?
Sometimes, when my children are crying because they're in pain, I know in my mind that they're not hurt very badly. That doesn't completely take away the compassionate pain I feel for them. I love them, and (some of) their pain becomes my pain. When they are hurt badly, my pain increases all the more, even if I'm confident that they will get better.
John 11:33-35 (NASB)
When Jesus therefore saw her weeping, and the Jews who came with her also weeping, He was deeply moved in spirit and was troubled, and said, “Where have you laid him?” They said to Him, “Lord, come and see.” Jesus wept.
It make more sense to understand this as saying that he felt compassion for these people, even friends of his, who were very sad about the death of Lazarus.