Part of the Taliban's origin stories over there have to be contextualized into those people's worldview and their culture.
For Westerners reading this, if someone over there declares you as a "friend", which can even happen with an innocuous casual meeting, it quite literally means that that person, their family, and all whom they consider as friends will die trying to save you or defend your honor etc.
That same extreme commitment to hospitality is cynically weaponized by terrorist groups to get volunteers en masse through political and religious means, whether that's framed as fighting Russian/American invaders or enemies of Islam.
It's quite a beautiful thing outside of that, but it only shows up in foreign media as populist support of bad actors.