To start with, in answering this question, we need to understand tht even Jesus Christ being God, he possess humane part which means he has flesh and blood, be feels, he has emotions and he can do other things done by mere men even considering the fact that he is God
Now lets look into the Bible, going to the book of JOHN 11:35, it says Jesus Wept, this verse happens to be the shortest verse in the Bible, but we would see that when Jesus Christ went to where Lazarus died, he wept which means the human part of him existed as at that particular point in time, now let the see the perspective of people who observed that scenario and what they said, looking into the book of JOHN 11:36, it says, Then said the Jews, Behold how he loved him. Which implies that however Jesus Christ is God, he still feels humans feelings such as love, emotions, anger, and so on but however he is God.
Now this tells us that despite the fact that Jesus Christ as the part of a deity, still yet he has the part of humane.
Now we would see that even that Jesus Christ knew Lazarus had died right before he even got there, and the fact that he had the power to raise him from the dead, he cried at first because as at that point in time he felt emotions because of his part of the human form.
▶️ 3Speak