Thomas P.M. Barnett posits that Turkey had planned for the confrontation with Israel as a way to jockey for its own nukes:
So now Ankara has its bloody shirt, which will be used once Tehran inevitably announces the weaponization of its nukes to justify Turkey's rapid reach for the same. Just like Tehran cannot openly rationalize its bid for regional supremacy vis-à-vis arch-rival Saudi Arabia, Turkey requires an appropriate villain for its nuclear morality play. Anybody watching the deterioration of Turkish-Israeli relations over the past year knew that some cause célèbre was in the works. Suddenly, if perhaps on purpose, Turkey can claim that despite its efforts to broker a non-nuclear peace in the region (including a recent enrichment deal engineered with Brazil) it needs its own deterrent against Israel's nuclear arsenal, too.