I think the answer lies in that paragraph. NATO was essentially set up in response to the Warsaw Pact, am I right?
The geopolitics of the ME and N. Africa changed dramatically with the fall of the USSR. And, Erdogan is no moderate; he is an Islamist. Erdogan has been trying to revamp the Turkish (secular) constitution and diminish the influence of the Turkish military, which traditionally is very secular.
I agree, that’s my take on it.