Disagree slightly here. They do refer to themselves as Afghan, but the level of loyalty for your typical person over there is: Family, Tribe (sometimes the same as family), Religion, Country.
You're right. Although modern Afghanistan has existed since it was "created" by the colonial Russian and British powers the tribal history goes back to before the common era.
From the link above:
..."THE CURSE OF AFGHAN DIVERSITY
Afghanistan's shifting alliances and factions are intertwined with its diversity, though ethnic, linguistic, or tribal variation alone does not entirely explain these internecine struggles. Afghanistan in its modern form was shaped by the nineteenth-century competition between the British, Russian, and Persian empires for supremacy in the region. The 1907 Anglo-Russian Convention that formally ended this "Great Game" finalized Afghanistan's role as a buffer between the Russian Empire's holdings in Central Asia, and the British Empire's holdings in India.
The resulting Kingdom of Afghanistan was and remains ethnically, linguistically, and religiously diverse. Today, Pushtuns are the largest ethnic group within the country, but they represent only 38 percent of the population. An almost equal number of Pushtuns live across the border in Pakistan's Northwest Frontier Province. Ethnic Tajiks comprise one-quarter of the population. The Hazaras, who generally inhabit the center of the country, represent another 19 percent. Other groups -- such as the Aimaks, Turkmen, Baluch, Uzbek, and others comprise the rest.(3)
Linguistic divisions parallel, and in some cases, overlap ethnic divisions. In addition to Dari (the Afghan dialect of Persian that is the lingua franca of half the population) and the Pushtun's own Pashtu, approximately ten percent of the population speaks Turkic languages like Uzbek or Turkmen. Several dozen more regional languages exist.(4)
Tribal divisions further compound the Afghan vortex. The Pushtuns are divided among the Durrani, Ghilzai, Waziri, Khattak, Afridi, Mohmand, Yusufzai, Shinwari, and numerous smaller tribes. In turn, each of these tribes is divided into subtribes. For example, the Durrani are divided into seven sub-groups: the Popalzai, Barakzai, Alizai, Nurzai, Ishakzai, Achakzai, and Alikozai. These, in turn, are divided into numerous clans.(5) Zahir Shah, ruler of Afghanistan between 1933 and 1973, belongs to the Muhammadzai clan of the Barakzai subtribe of the Durrani tribe. Such clan, subtribal, and tribal divisions contribute already intense rivalries and divisions.
Religious diversity further complicated internal Afghan politics and relations with neighbors. Once home to thriving Hindu, Sikh, and Jewish communities as recently as the mid-twentieth century, Afghanistan today is overwhelmingly Muslim."...