King David extended extraordinary respect and honor to Barzillai the Gileadite, driven by a deep sense of gratitude and admiration. This special treatment stemmed from three key factors. First, David honored Barzillai out of respect for his advanced age. Second, the king felt immense gratitude for the crucial help Barzillai provided during a period of great distress. Finally, Barzillai held a highly respected position in society, which commanded natural reverence [מלבי״ם].
During David's difficult time, Barzillai took it upon himself to supply the king with food and essential living necessities [מצודת ציון]. He was able to offer such extensive financial support because he was an exceptionally wealthy and distinguished individual, possessing the vast resources needed to sustain the king and his men.
This critical support was provided at Mahanaim. The primary approach among commentators is that Barzillai sustained David during the period the king stayed and lived in that location [מצודת דוד, רד״ק, ביאור שטיינזלץ]. Alternatively, another perspective suggests that this vital assistance was specifically given at the moment David returned to Mahanaim [רלב״ג].