Not really this story has been fabricated which is attested to by many as 15 scholars. Also there are seperate versions of this hadith with major companions without this addition.
Muslim scholars have stated this has been fabricated by those who left Islam. So why was it recorded because Muslims recorded everything bad or good and there sifting process went on later.
Also in the popluar dictonary to Islam by Professor Ian Richard netton he confirms this is a fake story.
The Prophet (peace and blessings of Allah be upon him) recited sura Namal and there was an apparent interjection from satan. He was at the Kaaba and at the end of the sura they all prostrated even the disbelievers.
This is point of attack of many Orientalists and others such as the text satanic verses. All these narrations are weak and there are missing people in the chain of transmission. Said ibn Jubar (95h), Abu bakr ibn Abdurrahman, Abu A’liya and Qatada are the sources for this event.