Short answer
So that he is never worshipped. Islam forbids any picture of the Prophet (ﷺ), and any picture of God (﷾). Nothing is like God (﷾), so any picture of Him is false. With good men, the danger is what their pictures become. First they are honoured, then lit with candles, and in time people pray to them. A companion of the Prophet (ﷺ) explained that the idols of Noah's people began as statues of good men. In many churches, images of Jesus and the saints are bowed to and lit with candles. Yet the commandment says "Thou shalt not make unto thee any graven image". The Prophet (ﷺ) cleared the idols from the Ka'ba (the House of God (﷾) in Mecca) and warned against image-making. He was buried out of view so his grave would not become a place of worship, and no authentic likeness of him exists.
Full explanation
Nothing is like God (﷾)
The first reason is about God (﷾). The Qur'an says there is nothing whatever like Him. A picture of God (﷾) would claim to show what He looks like, so Muslims have never made one. The rule about the Prophet (ﷺ) comes from the same concern: to keep worship for God (﷾) alone.
“(He is) the Creator of the heavens and the earth: He has made for you pairs from among yourselves, and pairs among cattle: by this means does He multiply you: there is nothing whatever like unto Him, and He is the One that hears and sees (all things).”
The commandment Moses brought
The commandment Moses brought forbids making a likeness to bow down to. It also forbids bowing down to it or serving it. It draws no line between venerating (deeply honouring) such an image and worshipping it. Islam did not invent the rule against images in worship. It kept the rule Moses brought.
“Thou shalt not make unto thee any graven image, or any likeness of any thing that is in heaven above, or that is in the earth beneath, or that is in the water under the earth: Thou shalt not bow down thyself to them, nor serve them: for I the Lord thy God am a jealous God, visiting the iniquity of the fathers upon the children unto the third and fourth generation of them that hate me;”
How pictures of good men become idols
The Qur'an names the idols of Noah's people. Ibn Abbas, the Prophet's (ﷺ) cousin, explained these names in a report al-Bukhari recorded. They were the names of righteous men. After they died, their people set up statues to remember them. No one worshipped the statues at first. Once that generation had died and the reason was forgotten, people worshipped them. The Prophet (ﷺ) described the same pattern when told of a church in Ethiopia. People there had built places of worship over the graves of good men and filled them with pictures.
“"And they have said (to each other), 'Abandon not your gods: Abandon neither Wadd nor Suwa', neither Yaguth nor Ya'uq, nor Nasr';-”
Ibn Abbas explains that the idols of Noah's people, Wadd, Suwa', Yaghuth, Ya'uq and Nasr, bore the names of righteous men. When those men died, their people set up statues where they used to sit and named the statues after them. The statues were not worshipped at first; only when that generation had died and the reason for them was forgotten did people begin to worship them.
Aisha reports that Umm Habiba and Umm Salama told the Prophet (ﷺ) of a church they had seen in Ethiopia with pictures in it. He said that when a righteous man died among those people, they built a place of worship over his grave and put those pictures in it, and that they would be the worst of creatures before Allah on the Day of Resurrection.
Islam closed the road at the start
When the Prophet (ﷺ) entered Mecca, he would not go into the Ka'ba until the idols and pictures had been taken out. He warned that image-makers would face the severest punishment. He sent Ali, his cousin and son-in-law, to level raised graves and efface images. He warned his followers not to over-praise him as Christians had over-praised Jesus. And he was buried inside the room of his wife Aisha, not in the open. Aisha explains that this was for fear his grave would be taken as a place of worship. No portrait was made in his lifetime, and no authentic likeness of him exists. The paintings made centuries later are imagined scenes, not likenesses. Some ask about the Black Stone of the Ka'ba. Muslims kiss it only because the Prophet (ﷺ) did. Umar, the second caliph, said he knew it was a stone that could neither harm nor benefit.
Ibn Abbas reports that when the Prophet (ﷺ) came to Mecca he would not enter the Ka'ba while idols were in it, and ordered them taken out. Pictures of Abraham and Ishmael were among the things removed.
Abdullah ibn Mas'ud reports that the Prophet (ﷺ) said the makers of images will receive the severest punishment from Allah.
Abu al-Hayyaj reports that Ali ibn Abi Talib told him: I send you on the mission the Messenger of Allah sent me on. Leave no image without effacing it, and no raised grave without levelling it.
Umar reports that he heard the Prophet (ﷺ) say: do not over-praise me as the Christians over-praised the son of Mary; I am only a servant, so call me the servant of Allah and His Messenger.
Aisha reports that in his last illness the Prophet (ﷺ) said Allah had cursed the Jews and the Christians for building places of worship at the graves of their prophets. She adds that, but for this, his own grave would have been placed out in the open; it was not, for fear that it would be taken as a place of worship.
Abis ibn Rabi'a reports that Umar came to the Black Stone and kissed it. Umar said that he knew it was a stone that could neither harm nor benefit, and that had he not seen the Prophet (ﷺ) kiss it, he would not have kissed it.
How Christians defend the veneration of images
The Catholic Church teaches that because in Christ God became visible, He may be pictured. It teaches that in 787 the Second Council of Nicaea, a gathering of church leaders, approved the veneration of icons (holy pictures). These show Christ, Mary and the saints. It holds that this does not break the commandment against idols. The honour, it says, passes to the person shown. It calls this veneration, not the worship due to God (﷾).
Teaches that the Council of Nicaea in 787, basing itself on the mystery of the incarnate Word, justified the veneration of icons, and that by becoming incarnate the Son of God introduced a new economy of images.
Teaches that the seventh ecumenical council, Nicaea II in 787, upheld the veneration of icons of Christ, Mary, the angels and the saints against the iconoclasts. It holds that this veneration does not break the commandment against idols, because the honour given to an image passes to the person it portrays, and it is a respectful veneration, not the adoration due to God alone.
The commandment and the icon
Catechism of the Catholic Church, paragraphs 2131-2132
Teaches that the seventh ecumenical council, Nicaea II in 787, upheld the veneration of icons of Christ, Mary, the angels and the saints against the iconoclasts. It holds that this veneration does not break the commandment against idols, because the honour given to an image passes to the person it portrays, and it is a respectful veneration, not the adoration due to God alone.
Cited for
Venerating an icon is not idolatry. The honour passes to the person the image shows, and it is veneration, not the adoration due to God alone.
The response
The commandment does not only forbid worshipping an image. It also forbids bowing down to one and serving it. Bowing before icons is one of the ways they are venerated. The idols of Noah's people also began as honour for good men.
Where it lands — The distinction between veneration and worship is not in the commandment, which forbids bowing to an image at all.
Numbers 21:8-9 — Torah, Bamidbar, chapter 21, verses 8-9
“And the Lord said unto Moses, Make thee a fiery serpent, and set it upon a pole: and it shall come to pass, that every one that is bitten, when he looketh upon it, shall live. And Moses made a serpent of brass, and put it upon a pole, and it came to pass, that if a serpent had bitten any man, when he beheld the serpent of brass, he lived.”
Cited for
God Himself ordered an image: Moses made a bronze serpent at His command, and those who looked on it lived.
The response
The same Bible records what became of it. In the days of Hezekiah the children of Israel were burning incense to that serpent, and he broke it in pieces. This is exactly the drift from memorial to worship that Islam blocked.
Where it lands — Even an image God (﷾) commanded became an object of worship, which is why Islam allows none in worship.
Perspectives
Catholic and Orthodox
Images of Christ and the saints may be venerated. The honour passes to the person shown, and this veneration is not the worship due to God.
The Second Council of Nicaea (787) approved the veneration of icons. The Catholic Catechism holds that this does not break the commandment against idols.
Rebuttal
Islam agrees that good people deserve honour. But Jesus was a messenger like those before him, not God made visible, so an icon of him shows a man. And the commandment forbids bowing down to a likeness, even in veneration, and the idols of Noah's people began as honour for good men.
The Islamic perspective
The Prophet (ﷺ) is loved and followed, never worshipped. Islam allows no likeness of him and kept his grave out of public view, so that the road from respect to worship stays closed.
The Qur'an says nothing is like God (﷾), so no picture of Him can be true.
According to Ibn Abbas, the idols of Noah's people began as memorials to righteous men. They were worshipped once their origin was forgotten.
The Ten Commandments forbid both making a likeness and bowing down to it.
The Prophet (ﷺ) cleared the idols and pictures from the Ka'ba and warned against image-making.
The Prophet (ﷺ) was buried out of public view for fear his grave would become a place of worship.
Islam forbids images of the Prophet (ﷺ) to protect the worship of God (﷾) alone. It does not do so to venerate the Prophet (ﷺ).