“…My slave draws near to Me with nothing more beloved to Me than that which I have made obligatory upon him. And My slave continues to draw nearer to Me with optional acts of devotion [nawāfil] until I love him…” [Bukhārī]
My slave draws near to Me with nothing more beloved to Me than that which I have made obligatory upon him. From this we learn that the discharge of obligatory acts [farā’iḍ] is the most beloved of acts in the sight of Allah.
Al-Ṭūfī said: ‘The command to observe the farā’iḍ is absolute, and punishment results from abandoning them, in contrast to nāfila actions. However if nāfila acts accompany the farā’iḍ, then the farā’iḍ are more perfect. This is why they are more beloved to Allah, and more effective in bringing one closer to Him. Moreover, the farḍ action is like a root and a foundation, while the nāfila act is like a branch or a building. When one performs the obligations in the required way, and obeys the commandments and respects the Commander, and magnifies Him through obedience, and manifesting the majesty of Lordship and the baseness of slavehood, then using this to draw close is the greatest of actions. Someone who carries out the farḍ may be doing so out of fear of punishment, while the person who practices the nawāfil is doing so only because of his preference for service. Hence he is rewarded with love, which is the greatest aspiration of the person who seeks Divine proximity though his acts of service.’
And My slave continues to draw nearer to Me with optional acts of devotion [nawāfil] until I love him. There appears to be a problem in reconciling this to the previous statement. Given that the farā’iḍ are the most beloved of works to Allah, how can they themselves not bring His love? The answer is that what is meant by nawāfil is that totality of practices which includes the farā’iḍ, and perfects them. Moreover, it is customarily the case that ‘drawing near’ takes place with something other than that which is obligatory for the one who seeks proximity, such as a gift, in contrast to, for instance, taxation, or the repayment of a debt. Further, one of the reasons for existence of nawāfil is to compensate for inadequately discharged farā’iḍ, as in the sound hadith narrated by Muslim which runs: ‘Look, and see if My slave has some supererogatory act by which his farīḍa may be made complete.’ This makes it clear that ‘drawing close with optional acts of devotion’ takes place for those who have performed what is obligatory, not for those who fail to do so. One of the great ones has remarked that ‘whoever is too busy with his obligations to do what is optional has an excuse; while he who is too busy with what is optional to do what is obligatory is beguiled and led astray.’
[Imām Ibn Ḥajar al-‘Asqalānī, فتح الباري شرح صحيح البخاري (Fatḥ al-Bārī Sharḥ Ṣaḥīḥ al-Bukhārī), English Translation: Selections from the Fatḥ al-Bārī (Commentary on Ṣaḥīḥ al-Bukhārī) by Shaykh Abdal Hakim Murad, Muslim Academic Trust, Cambridge, 2000, pp.18-19]