The alliances have been far from perfect, but they have kept the world relatively peaceful and prosperous since World War II.