He did not do so merely out of obligation. He really wanted to make his parents happy.
وَٱسْتِجَابَةً لِصَلَاةِ دَاوُدَ ،‏ أَبْطَلَتْ مَشُورَةُ حُوشَايَ ٱلشُّجَاعِ مَشُورَةَ أَخِيتُوفَلَ ٱلْخَائِنِ .‏ —‏ ٢ صم ١٥ :‏ ٣١ ؛‏ ١٧ :‏ ١٤‏ .‏