And when there came to them a Messenger from Allah (i.e. Muhammad) confirming what was with them, a party of those who were given the Scripture threw away the Book of Allah behind their backs as if they did not know!
As-Suddi commented on,
ولما جاءهم رسول من عند الله مصدق لما معهم
(And when there came to them a Messenger from Allah (i.e. Muhammad) confirming what was with them),
"When Muhammad came to them, they wanted to contradict and dispute with him using the Tawrah. However, the Tawrah and the Qur'an affirmed each other. So the Jews gave up on using the Torah, and took to the Book of Asaf, and the magic of Harut and Marut, which indeed did not conform to the Qur'an.
Hence Allah's statement,
كٲنهم ﻻ يعلمون
(As if they did not know!).''
Also, Qatadah said that Allah's statement,
كٲنهم ﻻ يعلمون
(As if they did not know!) means,
"They knew the truth but abandoned it, hid it and denied the fact that they even had it.''
Magic existed before Suleiman (Solomon)
Allah tells;