"But show kindness to the sons of Barzillai of Gilead and let them be among those who eat at your table. They stood by me when I fled from your brother Absalom."(1 Kings 2:7)
When David had to flee the palace fearing his son Absalom, there were some who helped David. Barzillai the Gileadite was one of them. When David came to Mahanaim, among others, Barzillai brought bedding and bowls and articles of pottery. They also brought wheat and barley, flour and roasted grain, beans and lentils, honey and curds, sheep, and cheese from cows' milk for David and his people to eat.
David desired to honor Barzillai after he had gained victory over Absalom and told him to come along with him to Jerusalem so that he could provide for him, but Barzillai politely refused telling David that he was very old and would like to spend his last days at home.
Later it was time for David to die. So he called Solomon and instructed him regarding the affairs of the kingdom. Among the matters that David told Solomon were the words that we read in the title verse here.
"But show kindness to the sons of Barzillai of Gilead and let them be among those who eat at your table. They stood by me when I fled from your brother Absalom."
David did not forget the kindness of Barzillai during his distress and wanted to repay him in some way, so he kept that in mind even when he was very old and decided to honor Barzillai by giving his sons the privilege to eat at Solomon's table. Thus he re-payed the kindness that Barzillai had shown him while he was in trouble.
MORAL: REPAYING KINDNESS IS JUST AND RIGHT IN GOD'S SIGHT