322. – Then when he says, So when God desired to show more abundantly to the heirs of the promise the immutability of his purpose, he interposed an oath, he states the reason why God willed to swear, namely, to show the immutability of His promise. Hence, he says, wherein, i.e., by the fact that He interposed an oath, desiring more abundantly to show; for it was abundant that He promised, but more abundant that He swore, desiring, I say, to show to the heirs of the promise, i.e., of the thing promised: 'They that are the children of the promise are accounted for the seed' (Rom. 9:8), to show, ...I say, the immutability of his purpose. It should be noted in regard to things which proceed from God that two things must be considered, namely, the coming-forth of things and God's counsel by which such a coming-forth is caused. God's counsel is absolutely unchangeable: 'My counsel shall stand and all my will shall be done' (Is. 46:10). But the disposition is quite changeable, for the Lord sometimes announces something according as the order and coming-forth of things requires, as in Is (38:1) 'Take order with your house, for you shall die and not live'; for the cause of his sickness was such that he should die from it. Also in Jonah (3:4): 'Yet forty days and Nineveh shall be destroyed', because it had deserved destruction: 'I will suddenly speak against a nation and a kingdom, to root out, to pull down and to destroy it. If that nation against which I have spoken shall repent of their evil, I also will repent of the evil I have thought to do to them' (Jer. 18:7). In this case the prophecy is a threat. But sometimes something is announced according to God's eternal counsel, and in that case God never repents or retracts it: 'But the triumpher in Israel will not spare, and will not be moved to repentance' (1 Sam. 15:29). Yet it should be noted that whenever God promises something under oath, it is a prophecy of predestination which reveals God's plan. Such a promise is absolutely unchangeable.
Source: Commentary on Hebrews