This meaning that 'jinns claim to know the unknown was proved wrong' is mentioned on some tafaseer. But it might not the right one, like if you read tafseer qurtabi, it mentions some ahadees(i am not quoting any because he has not given any references there.) that say when all this happened people saw that jinns didn't knew unseen.
Rather it was for the people/humans who believed that jinns knew the unseen. It was for them a lesson. As we know jinns try to steal:
Narrated 'Aisha, r.a. Some people asked Allah's Apostle (saaws) about
the foretellers. He said. -They are nothing." They said, -O Allah's
Apostle! Sometimes they tell us of a thing which turns out to be
true." Allah's Apostle said, "A Jinn snatches that true word and pours
it into the ear of his friend (the foreteller) (as one puts something
into a bottle). The foreteller then mixes with that word one hundred
lies."
Bukhari Vol: 9 Book 93 Hadith 650
And also how come all jinns had made such claim while they knew there limitations and all of them are not kaafir:
There are among us some that are righteous, and some the contrary; we
are groups each having a different way.
(Al-Jinn 72:11)
So, it's more probable that it was for the people to have them see by their eyes that jinns don't know unseen. Although the meaning that their claim was proved wrong is also mentioned on some places. Also both meanings can be right, some jinns might have claimed knowing the unseen. But all of them making such claim is not possible because of above ayah.
Allah knows best