Now, when trouble touches man, he cries to Us: But when We bestow a favour upon him as from Ourselves, he says, “This has been given to me because of a certain knowledge (I have)!” Nay, but this is but a trial, but most of them understand not!
It is trouble, distress, or adversity that makes men
realize their helplessness and turns their attention back
to the true Source of all goodness and happiness.
But when they are shown special Mercy -often more than
they deserve- they forget themselves and attribute it to
their own cleverness, or to the stars, or to some false
ideas to which they pay court and worship, either to the
exclusion of Allah or in addition to the lip-worship which
they pay to Allah.
Their action in any case amounts to gross ingratitude;
but in the circumstances it looks as if they had gone out
of their way to show ingratitude
Yusuf Ali, Abdullah. Translation and Commentary of the Quran. (surah 39 verse 49). Quran Arabic with English Translation & Commentary (Tafsir) by Abdullah Yusuf Ali, Free Download (quran4u.com)