That is a faked up assumption.
al-Tabari said concerning this story:
*Muhammad Ibn Yahya Ibn Hayyan narrated, "
The Messenger of God came to Zaid Ibn Haritha’s house seeking him. Perhaps the Messenger of God missed him at that time, that is why he said, ‘Where is Zaid?’
He went to his house seeking him and, when he did not find him,
Zainab Bint Jahsh stood up to [meet] him in a housedress, but the Messenger of God turned away from her.
She said, ‘He is not here, Messenger of God, so please come in; my father and mother are your ransom.’
The Messenger of God refused to come in. Zainab had hurried to dress herself when she heard that the Messenger of God was at her door, so she leapt in a hurry, and the Messenger of God liked her when she did that. **The heart of the Prophet was filled with admiration for her. **
He went away muttering something that was hardly understandable but for this sentence: ‘Praise be to God who disposes the hearts.’
When Zaid came back home, she told him that the Messenger of God came. Zaid asked, ‘You asked him to come in, didn’t you?’
She replied, ‘I bade him to, but he refused.’
He said, ‘Have you heard [him say] anything?’
She answered, 'When he had turned away, I heard him say something that I could hardly understand. I heard him say, “Praise be to God who disposes the hearts.” ’
Zaid went out to the Messenger of God and said, ‘O Messenger of God, I learned that you came to my house. Did you come in? O Messenger of God, my father and mother are your ransom. Perhaps you liked Zainab. I can leave her.’
The Messenger of God said, ‘Hold on to your wife.’ Zaid said, ‘O Messenger of God, I will leave her.’
The Messenger of God said, ‘Keep your wife.’
So
when Zaid left her, she finished her legal period after she had isolated herself from Zaid.
While the Messenger of God was sitting and talking with Aisha,** he was taken in a trance, and when it lifted, he smiled and said, ‘Who will go to Zainab to tell her that God wedded her to me from heaven?’ **
The Messenger of God recited; 'Thus you told someone whom God had favoured and whom you yourself have favoured: “Hold on to your wife.” ’
Aisha said, **'I heard much about her beauty and, moreover, about how God wedded her from heaven, and I said, “For sure she will boast over this with us.” ’ **
Salama, the slave of the Messenger of God, hurried to tell her about that. She gave her some silver jewellery that she was wearing." *
More help from Allah - so, this charge leveled against Muhammad necessitated the revelation of more Qur’anic verses:
*(Sura al-Ahzab Q.33: 40): “Muhammad is not the father of any of your men, but [he is] God’s Messenger and the Seal of the Prophets. God is Aware of everything!”
(Sura al-Ahzab Q.33: 37): “We married her off to you so that there would be no objection for believers in respect to their adopted sons’ wives once they have accomplished their purpose with them. God’s command must be done!” *
There is a considerable moral problem with such a self-serving revelation.
It is quite clear that Prophet Muhammad was attracted to Zainab before Zaid divorced her and it might well have been the true reason for the divorce itself.
And Qur’anic verses do make clear that there was something going on before Zaid divorced Zainab.
The entire melodrama: Zaid’s divorce of Zainab, Muhammad’s marriage with Zainab and subsequent revelations of several Qur’anic Ayats from Allah to purify this scandalous happening is something to ponder very seriously.
There is more in this strange story. That this action is immoral and
this revelation/justification of it self-serving and not fitting for a true word of God is an important aspect, but not a contradiction within the Quran - even though contradicting the true character of God, who is moral purity.
Prohibiting adoption is no way a moral action. Prohibitions of alcohol drinking, smoking, gambling, sorceries, killing, etc., could be a moral action.
But why was there prohibition of adoption?
**The logical difficulty is that Allah (?) causes a scandal and then sends Gabriel to officially justify the scandalous action of Prophet Muhammad with Qur’anic revelations is morally incorrect and too much of a coincidence. **
Pre-Islamic Arab Custom: Adoption of orphan/helpless child was a very popular and moral practice amongst pre-Islamic Arabs. By adopting orphan/helpless child, they used to consider adopted child as their own. And they used to pass onto them the adopter’s genealogy and name, his investment of them with all the rights of the legitimate son including that of inheritance and the prohibition of marriage on grounds of consanguinity.
How and why was this noble custom of adopting a child among human being prohibited?
Islam prohibits adopting children. Period. Adoption in the technical sense is not allowed in Muslim Shriah law. This is because Allah does not like this gesture of adopting orphan children.
These incidents are not in harmony with the ethics and conventions that Muhammad introduced to mankind, as Muslims claim. Abdullah Ibn Umar narrated: **"We have always called him Zaid Ibn Muhammad till the verse ‘Muhammad is not the father of any of your men’ was revealed.’ " **