What made Ankara do an about-face and re-embrace the West? Recognition of what gives it power in the Middle East.