Now for a healthy dose of reality. Both Sunnis and Shias agree that Muhammad allowed his followers to practice Muta. Shias generally believe that the practice is still permissible, while Sunnis typically claim that Muhammad eventually abrogated the practice.
What Sunni scholars fail to mention, however, is that even their most reliable sources are thoroughly inconsistent. Some Sunni ahadith state that Muhammad outlawed Muta, while others declare that the practice was banned by the Caliph Umar, not by Muhammad.
Indeed, according to a Hadith in Sahih al-Bukhari (Sunni Islam's most trusted collection of ahadith), Muta is justified by the Qur'an itself! Consider the following verse from the Qur'an:
Qur'an 5:87—O ye who believe! Forbid not the good things which Allah hath made lawful for you, and transgress not, Lo! Allah loveth not transgressors.
Now let's see how this verse was used by Muhammad:
Sahih al-Bukhari 5079—We used to participate in the holy battles led by Allah's Messenger and we had nothing (no wives) with us. So we said, "Shall we get ourselves castrated?" He forbade us that and then allowed us to marry a woman temporarily by giving her even a garment and then he recited to us: "O you who believe! Make not unlawful the good things which Allah has made lawful for you." (5.87)
Hence, Muhammad quoted the Qur'an to justify Muta!
So if Muhammad allowed his followers to engage in prostitution, why do Sunni Muslims today believe that Islam doesn't allow Muta? According to some of Muhammad's companions, it was Umar (not Muhammad) who outlawed the practice:
Sahih Muslim 3250—Abu Nadra reported: While I was in the company of Jabir b. Abdullah, a person came to him and said that Ibn 'Abbas and Ibn Zubair differed on the two types of Muta, whereupon Jabir said: We used to do these two during the lifetime of Allah's Messenger. Umar then forbade us to do them, and so we did not revert to them.
Indeed, Muslims continued to practice Muta until Umar stopped them:
Sahih Muslim 3248—Ibn Uraij reported: 'Ati' reported that Jabir b. Abdullah came to perform 'Umra, and we came to his abode, and the people asked him about different things, and then they made a mention of temporary marriage, whereupon he said: Yes, we had been benefiting ourselves by this temporary marriage during the lifetime of the Holy Prophet and during the time of Abu Bakr and ‘Umar.
But how can Umar abrogate Muhammad's commands, especially when the Qur'an allows Muta? Apparently, Umar's supporters weren't comfortable saying that Umar abrogated Muta. Thus, they began circulating false ahadith, according to which Muhammad himself banned the practice:
Sahih al-Bukhari 5115—Narrated Ali: I said to Ibn Abbas, "During the battle of Khaibar the Prophet forbade Muta and the eating of donkey's meat."
How does all of this cash out for Muslims today? Well, if a Sunni Muslim is offended at the thought of prostitution in Islam, he can quote ahadith saying that Muhammad put an end to Muta. If, however, a Sunni Muslim wants to have sex with a prostitute, he can quote other ahadith, which say that Muhammad and the Qur'an allow Muta. Islam's teachings, then, depend on a Muslim's preferences!
For Shias, on the other hand, there's no such difficulty. Muhammad allowed Muta, so they still practice Muta. Hezbollah is even using it as a recruiting tool. Much like their prophet, they lure people to Islamic terrorism through promises of sex.
For more on Muta, see the following article: