-->
I.e., because they would have known that Solomon's sway over them had ended. In the elliptic manner so characteristic of the Qur'an, stress is laid here, firstly, on the limited nature of all empirical knowledge, including the result of deductions and inferences based on no more than observable or calculable phenomena, and, secondly, on the impossibility to determine correctly, on the basis of such limited fragments of knowledge alone, what course of action would be right in a given situation. Although the story as such relates to "invisible beings", its moral lesson (which may be summed up in the statement that empirical knowledge cannot provide any ethical guideline unless it is accompanied, and completed, by divine guidance) is obviously addressed to human beings as well.
This is yet another of the many Solomonic legends which had become an inalienable part of ancient Arabian tradition, and which the Qur'an uses as a vehicle for the allegorical illustration of some of its teachings. According to the legend alluded to above, Solomon died on his throne, leaning forward on his staff, and for a length of time nobody became aware of his death: with the result that the jinn, who had been constrained to work for him, went on labouring at the heavy tasks assigned to them. Gradually, however, a termite ate away Solomon's staff, and his body, deprived of support, fell to the ground. This story - only hinted at in its outline - is apparently used here as an allegory of the insignificance and inherent brittleness of human life and of the perishable nature and emptiness of all worldly might and glory.
Al-ghayb, "that which is beyond the reach of [a created being's] perception", either in an absolute or - as in this instance - in a relative, temporary sense.
Which he died while leaning on.
This statement illustrates three points: (1) however great and glorious human power and grandeur may be, it is only for a time, and it may fade away even before people know of its decline; (2) the most remarkable events may be brought to light, not by a flourish of trumpets, but by a humble individual, unknown and unseen, who works imperceptibly and undermines even so strong a thing as staff, on which a great man may lean; (3) work done by men merely on the basis of brute Strength or fear, as in the case of the Jinns, will not endure. This is brought up in strong contrast against the Power and Majesty of Allah, which will endure, which cannot be sapped, and which can only be fully appreciated by a training of the will and heart. In the same way, in David's story above, his mighty strength as a warrior (see ii. 251) and his skill in making armour are only to be valued when used, as it was used, in the service of Allah, in righteous works (xxxiv. 1 1).
The Jinns looked upon their work as a Penalty, and so it became to them. The people who worked at the Temple of Solomon as the People of David worked and gloried in their work as a thanksgiving to Allah, and their work became sanctified. The Jinns knew nothing of hidden secrets; they only saw the obvious, and had not even the significance of the little worm that slowly gnawed away Solomon's staff.