One day Muhammad goes to Zaid’s house but finds that he was not home. Zaid was the adopted son of Muhammad.
Zaid’s beautiful wife, Zainab, was there all by her lonesome self.
She was clothed skimpily. He sees her and is smitten. One account says “she was in her chamber undressed and admiration for her entered the heart of the prophet.”
Being the stand-up moral guy that he was, he turns to leave but blurts out “Glory to God who causes hearts to turn.”
When Zainab hears that, she perceives Muhammad was sexually attracted to her.
When Zaid finds out about this incident later, it is recorded that “she [became no longer] attractive to him [Zaid]. Perhaps out of jealousy, he began to despise her.
Zaid pays a visit to Muhammad fawning over him, “Messenger of Allah, you are so dear to me. Perhaps Zainab has excited your admiration and so I will separate myself from her.”
Being the sweet guy that he was, Muhammad tells him to stay married. The account records that Muhammad hid in his mind the thought that “if he (Zaid) separates himself from her, I will marry her.”
Unfortunately, the marriage of Zaid and Zainab (a marriage that Muhammad himself had arranged) was beyond repair and ends in divorce. But our shy-guy bridegroom Muhammad was worried what people would gossip if he swooped onto Zainab, the ex-wife of his own adopted son.
Allah to the rescue, as always, with some “just-in-time” revelations approving the marriage as well as the sudden prohibition of adoption, so that Zaid was no longer his adopted son. Thus conveniently paving the way for him to make Zainab his wife without feeling guilty and having to answer the pesky neighbors.