(Devarim 32:40) "For I shall raise My hand (in oath) to heaven": When the Holy One Blessed be He created man, He did so by pronouncement (ma'amar) and not by oath. And who caused Him to swear? Those lacking in faith. As it is written (Psalms 106:26-27) "And He lifted up His hand to cast them down in the desert and to cast down their seed among the nations."
Why God Swore an Oath to Humanity
Sifrei Devarim 330:1