Imām Ibn Rajab (d. 795 AH) said:
If Allāh guides one of His servants to thank Him for the bounties He has chosen to bestow on him in this worldly life by means of his saying: الحمد لله(all praise be to Allāh), or by some other means of showing gratefulness to Him, then [the gratitude he has shown] will be considered superior to the bounty for which he is showing gratefulness. This gratitude is more beloved to Allāh as He loves those who praise Him. He is pleased with His slave who eats a meal and finishes it by praising Him. Or drinks a beverage and praises Him for it. For the commemoration of bestowed bounties, praising and showing gratitude to the bestower in relation to it, is more beloved to the people of generosity and goodness than the money they spend. As they only spend from their wealth in pursuit of praise and recognition. However, Allāh is the Most Generous of those who show generosity, the best of those attributable to goodness. He bestows bounties on His slaves and asks them to commemorate Him for those bounties, that they remember Him by it, and that they praise Him for it. When they do so, He is pleased with them which shows Him to be al-Shakūr (most ready to appreciate the good deeds of his slaves and recompense them for it). Even if all of this [that is, the bestowing of bounties and the ability and guidance of the slave of Allāh to show gratitude to Him] is all from among His bounties on them anyways. He has no need for their gratitude, but He loves it from His slaves. This is only because the uprightness of His slaves, their success, and ultimate perfection is predicated upon this gratitude.
Furthermore, it is only from His blessings upon them that He even allows the praise and gratitude that they show to be attributable to them. For [being guided to and possessing the ability to show gratitude to Him] is from among His greatest favours upon them. This is similar to the way He grants them wealth then extracts from it a goodly loan which He then praises them for giving. All the while that wealth, in its entirety, belongs to Him and is from among His blessings. However, His encompassing generosity stipulates this [i.e., that he praises His slaves for giving wealth that does not belong to them in the first place].
Source: Jāmiʾ al-ʿUlūm 3: 517
Translated by: Riyāḍ al-Kanadī