So when they forgot that by which they had been reminded, We opened to them the doors of every [good] thing until, when they rejoiced in that which they were given, We seized them suddenly, and they were [then] in despair.
The Idolators Call On Allah Alone During Torment and Distress
Allah states that He does what He wills with His creatures and none can resist His decision or avert what He decrees for them. He is the One Who has no partners, Who accepts the supplication from whomever He wills. Allah said,
(Say: "Tell me if Allah's torment comes upon you, or the Hour comes upon you, would you then call upon any one other than Allah (Reply) if you are truthful!") This means, you -- disbelievers -- will not call other than Allah in this case, because you know that none except He is able to remove the affliction. Allah said,
As for the statement: فَتَحْنَا عَلَيْهِمْ أَبْوَابَ كُلِّ شَيْءٍ (We opened for them doors of everything) appearing in the third verse (44), it warns human beings at large that no one should be deceived by seeing the affluence of persons or groups and hasten to the conclusion that these were the people on the correct path and that their life was a model of success. One should never forget that among them there could be some of those disobedient ones who have been picked out to be seized with sudden and grave punishment.
Therefore, the Holy Prophet ﷺ said: When you see blessings and wealth raining upon someone - though he is deep in sin and disobedience - then, know that he is being lured into destruction اِستِدرَاج (Istidraj), that is, his affluence is an indicator of his being seized in punishment. (Narrated by Ahmad from 'Aqabah ibn ` Amir as in Tafsir Ibn Kathir)
Following a narration from Sayyidna ` Ubadah ibn Al-Samit, leading commentator Ibn Jarir has reported that the Holy Prophet ﷺ said:
When Allah Ta’ ala wills to have a nation survive and grow, He creates in them two qualities: (1) moderation in everything they do, and (2) modesty and chastity, that is, abstinence from indulging in what is not right. And when Allah Ta` ala wills to destroy a nation, He opens for them the doors of breach of faith (Khiyanah), that is, they appear to be successful in the world despite their breaches of faith and wrong doings.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 41–44
History bears witness to the fact that a man starts invoking the name of God in crucial moments; even one who relied on beings other than God or did not believe in God’s existence at all. This is nature’s testament to God’s existence and His being the absolute authority. Under extraordinary circumstances, when the outward veils are removed and when man dismisses all superficial thoughts, he does not remember anything except God. In other words, on reaching the point of helplessness, every man admits the existence of God. But the Quran demands that man should follow a course of acceptance and obedience at a time when there is no apparent compulsion to do so. All animals other than man instinctively lead realistic lives. But what pushes man towards realism and the admission of the truth is the psychology of fear. In the world of animals all things are accomplished by instinct. The same role is played by fear of God (taqwa) in the world of human beings.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.