Taking a verse out of its context and interpreting it independently, is not how one reads the Qur’an (or any book for that matter).
The context is:
On the other hand, there are such people also who buy absurdities so that they lead astray from God’s path without any knowledge, and make fun of His revelations. It is these people for whom there is a humiliating torment. (Qur’an 31:6)
When any of them is recited these revelations of Ours, he turns and walks away with great arrogance as if he has not even heard them, as if he is deaf. So, give him glad tidings of a painful torment. (Qur’an 31:7)
This is referring to those who rejected the Messenger of God in his time. They would spread rumors about the revelations of God, hoping to mislead people from it and Qur’an quotes these idle tales:
They do not merely call it magic; in fact, they have also said: “These are wayward dreams.” In fact, also [said]: “He has fabricated this Qur’ān from himself.” In fact, this also: “He is a mere poet.” (Qur’an 21:5)
Ghamidi Sahab explains the word used for ‘buy’ and ‘idle tales’ as folllow in Al-Bayan:
Footnote 5. Ie., give them preference and demand them. When the word اِشْتِرَاء is used for metaphorical things, then it occurs in precisely this meaning.
6. The actual word is: لَهْوَ الْحَدِيْثِ. This expression is similar toزُخْرَفُ القُوْلِ used verse 112 of Surah al-An‘am. Here this expression is used in contrast to the verses of the book replete with wisdom. Hence it will refer to the absurdities and nonsensical things which the miscreants spread to lead people away from the Qur’ān.
The verses are not talking about music or fiction made for entertainment. It is talking about rumors that were made by enemies of Islam to specifically drive people away from Allah’s Message when His own Messenger was among them, reciting that Message and confirming it. But instead of taking it seriously and investigating it, they resorted to making rumors and fun of it. People would buy into the stories that were falsely spread about Islam rather than investigating the Messenger of God themselves in a serious manner.