There was little enthusiasm for the election there. I asked a group of men at the camp’s mosque if they planned to vote. “What difference does it make?” Mohammed Fatih, a refugee from Helmand, replied. “We voted in 2004 and 2009, and we’re worse off than ever. Politics is for the rich and important people, not the landless and unfortunate.” The others nodded in agreement.

These men are representatives of the vast swaths of Afghanistan that have hardly benefited from the international intervention and the new democratic order it established. The rural-urban divide is stark: While the cities are vibrant, there is a full-blown and worsening humanitarian crisis in many conflict-affected areas. The United Nations reports, for example, that cases of severe malnutrition among children have increased by 50 percent since 2012. The number of internally displaced Afghans has been rising as well.

This gap between urban democracy and rural misery is the product not only of the country’s conflict with the Taliban but also of a political system that disenfranchises its constituents. Given that in 2001 development experts treated Afghanistan as a tabula rasa, it is perverse just how much the system they put in place now contributes to, rather than alleviates, the country’s difficulties.

Afghanistan has a winner-take-all system, where the president appoints all positions in government, down to the district level. His office is barely checked by the judiciary or Parliament, both of which are weak on paper and weaker in practice. But then the all-powerful executive is itself a fiction. Given how fragmented the country is, and how feeble its institutions are, the president must co-opt local powerbrokers, in an informal and corrupt process of favor-swapping that takes place behind the scenes.

Much of Mr. Karzai’s most frustrating behavior — his propensity to divide-and-rule, his tolerance of corrupt allies, his strategically erratic behavior — can be understood as a response to the demands this system places on its nominal leader. It is a system that will remain unchanged by this latest election: Even an educated technocrat like Mr. Ghani was compelled to partner with a man like Mr. Dostum, whom he himself once called, well before this race, a “known killer.”

International donors have spent around $1 billion on elections and related development projects here since 2001, and the current round will cost another $126 million, according to Ziaulhaq Amarkhil, the chief electoral officer. Despite the expense, the fundamental flaws that make fraud easy have not been fixed. Most glaringly, there is the lack of a proper census and voter rolls, meaning that there is no way of matching voters against a database. Some 21 million voter ID cards have been issued, even though there are only 12 million eligible voters. If Afghanistan’s next president wishes to be seen as legitimate by his people, he will have to do more than simply win.

Matthieu Aikins is a magazine writer living in Kabul.