And the reason it was revealed is that a faction of the Jews wanted to stir up discord among the Muslims. They are therefore unquestionably included, even though the wording is unrestricted and can cover both communities.
He—exalted be He—also ordered him to ask those who had been reading the Scripture before him, but only on the assumption of doubt. This in no way implies that the Messenger doubted or actually asked—if the address is taken as directed to him—and if it is said to be directed to someone else, that is even clearer. For attaching a ruling to a condition does not require that the condition be realized; a ruling may well be linked to an impossible condition simply to clarify its legal consequence.
He—exalted be He—says:
“From his descendants We guided David, Solomon, Job, Joseph, Moses, and Aaron—thus do We reward those who do good; and Zechariah, John, Jesus, and Elias—each of them was of the righteous; and Ishmael, Elisha, Jonah, and Lot—each one We favored above all people.” ⦗al-Anʿām: 84–86⦘
Thus He informs us that if they had committed shirk, all the deeds they had done would have been rendered worthless, despite the impossibility