I wouldn't like to leave you with the impression that Afghanistan has never had a judiciary and we're just trying to impose one on them. Actually the Taliban had a very effective judiciary. Whenever people in Afghanistan say something positive about the Taliban, that is usually what they compare unfavourably to the current situation.
The reason they can do that is because there is considerable legal capacity in Afghan society, but it is capacity to administer sharia as interpreted by the Islamic clergy, not to administer the state law, which also exists. But in the history of Afghanistan there have been governments that have created relatively powerful judiciaries based on state law.
Alongside the state law, there has also always existed customary law, which varies throughout the country and which has been used as the main mode of dispute settlement. And to some extent the formal, state-sponsored judicial system has acted as a whole as a court of appeal from this customary system when one party or another was dissatisfied with it.
So there is a problem, which is being debated among Afghans, of how or whether to integrate or recognize customary law within the formal legal system--not to give formal approval to things like resolving disputes by exchanging daughters but precisely to try to use the positive capacity that it represents while perhaps, as the Afghan constitution requires, curbing its abuses.