Answer:
وَمِنَ الشَّيَاطِينِ مَن يَغُوصُونَ لَهُ وَيَعْمَلُونَ عَمَلًا دُونَ ذَٰلِكَ ۖ وَكُنَّا لَهُمْ حَافِظِينَ ﴿٨٢﴾
“And among the devils were some who dived for him and did other work besides that, and We were their guardians.”
Allah the Most High has mentioned the kingdom of Sulayman (peace be upon him) and the subjugation of the jinn under him: the jinn would bring out diamonds, jewels and the like from the water for him. ويعملون عملا دون ذلك That is, Allah protected him from any of the devils harming him; rather, all of them were in his grasp and under his authority. None of them dared to come near him; rather, he was the one who decided all their affairs. Whomever he wished he would leave free, and whomever he wished he would imprison. That is why Allah the Most High said:
وَالشَّيَاطِينَ كُلَّ بَنَّاءٍ وَغَوَّاصٍ ﴿٣٧﴾ وَآخَرِينَ مُقَرَّنِينَ فِي الْأَصْفَادِ ﴿٣٨﴾
“And the devils, every builder and diver, and others bound together in chains.”
That is, some of them were those who built astonishing structures, namely rooms, statues, large basins like reservoirs, and large cooking pots fixed in one place, and they carried out difficult tasks that no human being was able to do. There was a group who would dive in the seas and bring out diamonds, jewels and other fine things from them.