Allah, the Exalted, chose the choicest among the men to be prophets and messengers. The Wisdom of Allah entails that all the prophets and messengers must be attributed with befitting attributes that enforce their credibility so that they would be successful to convey the message from Him.
Hence, from mankind, Allah, the All-Knowledgeable and All-Wise, selected for the status of prophet-hood men of exemplary conduct and best of linage among their people and of most appealing appearance and manners; and protected them from characteristics that repel people from accepting their call. These include physical defects and repulsive illnesses like leprosy and vitiligo and worms exiting the body.
As for what is wrongly mentioned about Prophet Ayyub that he was inflicted with an illness that caused worms excrete from his body and that the worms ate his flesh – that is false. People are repulsed from people with such inflictions. Allah the Exalted does not inflict any of His prophets with matters that disgust people, given that He has sent them with a revelation to call the people to the true religion.
Also, my brothers in faith, Allah has protected His prophets from vileness and foolishness; hence none of the prophets is vile who, for example, sneaks lustful looks at females. And none of the prophets is foolish who, for example, says ugly words and uses obscene language. As for what some people wrongly say about Prophet Dawud (may Allah raise his rank), that he once peaked at the wife of his army commander while she was bathing nakedly and admired her so much that he sent her husband to fight in a battle and be killed in order to take his wife—is utterly false. How can this be attributed to a prophet whom Allah has sent to teach the people good manners, given that even vile people would not accept to be attributed with such unethical behaviour?
Allah has also protected the prophets from committing major sins such as drinking alcohol and fornication/adultery. Hence, it is absolutely false what some claimed that once Prophet Lut drank alcohol and fornicated with his two daughters and that Prophet Yusuf intended to fornicate with the wife of al-^Aziz.
Dear brothers in Islam, be wary of any saying that falsely ascribes any of the prophets with foolishness or vileness. All prophets must be attributed with truthfulness, trustworthiness and chastity. Consequently, lying, dishonesty, vileness, stupidity, and dullness are impossible to be among their attributes. Furthermore, prophets must be attributed with sharp intelligence; whereas, stupidity and dullness is impossible for them. All prophets are courageous and are clear from cowardice. All prophets are Muslims; they are impeccable and infallible from committing any blasphemy pre and post prophet-hood. Prophets do not fall into major sins, nor do they fall into small abject sins, such as stealing a berry of grape. It is possible however for prophets to commit non-abject small sins, or small sins that do not display low character, however, they are guided to immediately repent before anyone imitates them with such a sin.
Dear brothers, glorify the prophets of Allah and know and appreciate their privilege and high status; and be wary of ascribing to them that which does not befit them, as this leads to destruction and torture.