Supplementary note:
I can discern no compelling reason for the author to cite this ḥadīth in the Book of Zakāh. Perhaps he simply followed Imam Muslim, who placed it under the zakāh chapter in his Ṣaḥīḥ. Or he may have wished to demonstrate that, in the closing days of his mission—after Allah had strengthened and honored Islam—the Prophet ﷺ still granted a share of the war booty to those whose hearts were being reconciled.
By analogy, they may likewise receive a portion of the zakāh, contrary to the opinion of scholars who maintain that their share was cancelled once Islam had become mighty, such as Abū Ḥanīfah and his companions.
The sound view is that giving them zakāh to win their allegiance remains permissible whenever need dictates. This is the well-known position in the school of Imām Aḥmad and is one of its distinctive rulings.
Those who deny their entitlement have no evidence to oppose either the practice of the Prophet ﷺ or the verse in Sūrat al-Barāʾah, which was among the last passages revealed in the Quran.