Why it's the capital
Kabul was already an old and important city when, in 1776, Timur Shah Durrani moved the capital of the Durrani Empire here from Kandahar. That is when Kabul became the capital of Afghanistan.
Capital of AfghanistanKabul lies in the eastern half of Afghanistan, high in a narrow valley of the Hindu Kush mountains, along the Kabul River.
Kabul was already an old and important city when, in 1776, Timur Shah Durrani moved the capital of the Durrani Empire here from Kandahar. That is when Kabul became the capital of Afghanistan.
Go west from Islamabad, a little to the north, across the border into Afghanistan. Kabul is also almost straight south of Dushanbe.
Sources: Wikipedia: Kabul, Wikipedia: Gardens of Babur