Quran 33:38 — The Parties (Al-Ahzab)
The prophet is not committing an error by doing anything that is made lawful by GOD. Such is GOD's system since the early generations. GOD's command is a sacred duty.
[33:37] Recall that you said to the one who was blessed by GOD, and blessed by you, "Keep your wife and reverence GOD," and you hid inside yourself what GOD wished to proclaim. Thus, you feared the people, when you were supposed to fear only GOD. When Zeid was completely through with his wife, we had you marry her, in order to establish the precedent that a man can marry the divorced wife of his adopted son. GOD's commands shall be done.
[33:39] Those who deliver GOD's messages, and who reverence Him alone, shall never fear anyone but GOD. GOD is the most efficient reckoner.