In Qur'an, Allah says;
And We did not make the prophets forms not eating food, nor were they immortal [on earth].
What is the Hikmah of Prophets being mortals eating food?
The reason is simply because of the core message of Islam: Laa ilaaha illa Allah. The word ilah, in Arabic, means anything that anyone worships. It includes idols, false gods, Allah, and others. And worship, in Islam, is everything from du'a to sacrifical animals, to more.
Narrated Abu Huraira: Allah's Apostle said, "May Allah's curse be on the Jews for they built the places of worship at the graves of their Prophets." (Saheeh Bukhari)
Keeping in mind the understanding of Islam's core message, we see a clear warning: don't worship your prophet. He was a man, just like you. He ate food (and digested it), just like you did. He had needs, like you did.
The previous nations exalted and venerated their prophets, and even built masajid on top of their graves.
This is why it's important: to realize that they are humans, just like us, and not worthy of our worship, despite their elevated status in the Hereafter.
Unfortunately, you can also see examples of over-veneration and worship to our Rasool (Apostle) in many corners of the Muslim world. May Allah forgive us and guide us.
On one hand let me ask you this question: What do you think about a rich person giving hope to the poors that if they will be patient the good days will come? The rich never understand how would be like to be poor, the hope giving would not be honest then, I guess. The prophets were not prevented from doing sins either, they were given desires much stronger (up to 50 times according to a Shia Hadith) than the usual people, but they all controlled their desires with the power of believe and intellect! Allah has warned us:
O ye who believe! Why say ye that which ye do not? [61:2]
if such things are stated by an angel that will not be fair to expect such things from humans as well, isn't it? The prophets have been always a pattern to their people so they should have been in their same situations, tasting hunger and thirst, darkness and cold and hot, injuries and closeness of death.
Say, "If there were settled, on earth, angels walking about in peace and quiet, We should certainly have sent them down from the heavens an angel for a messenger." [17:95]
On the other hand, it is according to the very original will of Allah that the before-death life should be a place for conflict between sensibility and intellect. These conflicts are called examinations. We are told of the set of all rights and wrongs, we should first believe in the message from Allah sent through his many Messengers, then apply it to our lives:
Do men think that they will be left alone on saying, "We believe", and that they will not be tested? [29:2]
The examination will not be a real benchmark for our beliefs until there is a conflict between desire and intellect. Intellect pushes us to choose according to our belief, while desire pushes us to choose according to our wishes and instincts. Preferring intellect over desire is not easy in general, not very easy anyway. Humans most of the times want more reasons to stop them being led by desire, compared to the small set of reasons intellect put forward to them. They care a lot to make sure that they are not putting aside what they like very much for no strong reason! But the "strong reason" that they are expected to have is much stronger than is usually provided for them, they very much like to have "no other choice" than to select what their intellect wants them to choose! And this is dangerous. But Allah wants them to choose according to their intellects even so they have other choices as well! So many times in Quran Allah stresses on the fact that the non-believer wanted their prophets to ring them strange miracles for them to believe, and all the time they were told that the miracles are only up to Allah Himself and they cannot do anything without Him letting them. There have been times that the non-Believers questioned about if Allah wants to send us a message why not to send it via an angel that we can see it and easily approve it being sent from God? Then Allah explains:
They say: "Why is not an angel sent down to him?" If we did send down an angel, the matter would be settled at once, and no respite would be granted them./ If We had made it an angel, We should have sent him as a man, and We should certainly have caused them confusion in a matter which they have already covered with confusion. [6:8,9]
And you see how the non-believers have always ridiculed the messengers of Allah by telling that they are only humans like us:
"Thou art no more than a mortal like us, and indeed we think thou art a liar!" [26:186]
They said: "Shall we believe in two men like ourselves? And their people are subject to us!" [23:47]
Their messengers said: "Is there a doubt about Allah, The Creator of the heavens and the earth? It is He Who invites you, in order that He may forgive you your sins and give you respite for a term appointed!" They said: "Ah! ye are no more than human, like ourselves! Ye wish to turn us away from the (gods) our fathers used to worship: then bring us some clear authority." [14:10]
But the chiefs of the Unbelievers among his people said: "We see (in) thee nothing but a man like ourselves: Nor do we see that any follow thee but the meanest among us, in judgment immature: Nor do we see in you (all) any merit above us: in fact we think ye are liars!" [11:27]
And yes, they prophets are all human like us, but we should believe in them and their message from Allah for that it is intellectual, although we have always other choices as well and Allah would never force anyone to choose the right way:
We showed him the Way: whether he be grateful or ungrateful (rests on his will). [76:3]
Let there be no compulsion in religion: Truth stands out clear from Error: whoever rejects evil and believes in Allah hath grasped the most trustworthy hand-hold, that never breaks. And Allah heareth and knoweth all things. [2:256]
If it had been thy Lord's will, they would all have believed,- all who are on earth! wilt thou then compel mankind, against their will, to believe! [10:99]
It may be thou frettest thy soul with grief, that they do not become Believers./ If (such) were Our Will, We could send down to them from the sky a Sign, to which they would bend their necks in humility. [26:3,4]
Also note that the prophets are always told to be Bashar "بشر" like us and not Insaan "انسان" like us, as Bashar only points to the appearance of a human, while Insaan also points to its inside, they are so closer to God than we are!
And God knows best.
Tafseer of this verse is as follows
(We gave them not) i.e. the Prophet (bodies that would not eat food) or drink, (nor were they immortals) in this worldly life. Rather, they ate and drank and died. This verse was revealed about the people of Mecca when they said: how come this Messenger eats food and walks in the marketplace?
Basically God answered queries by the people of Mecca who thought prophet are extraordinary people who may not require any food or who can live like other people. God answer it and said, they eat food like us and die. They are not immortal. They are basically people like us.
The Quran is a very eloquent book. When it talks about the prophets (pbuh) eating it also includes a lot processes associated with eating; like hunger, call of nature, weakness (in the absence of food).
If you see any verse where "eating" is used in this context, you will notice that the verses around talks about the prophets being human.
The Quran even talks about Jesus (pbuh) and his mother in this fashion (Quran 5:75) as their followers took them as gods and worshipped them. Here too the Quran implies that they cannot be gods but were human beings and ate food and hence were associated with all processes that come along with eating food.