Decades of Western diplomacy misjudged Iran’s ideology, fueling a war that the West was unprepared for.