It's hard to say what direction they're heading these days. When NATO was founded, there was a concerted effort to bring both Turkey and Greece into the alliance, as there was a fear they could fall under Soviet control. I don't think the U.S. leadership cared about anything else about a leader or government, except that they were anti-Soviet. This is also how we ended up backing the Shah of Iran, who, along with Iraq, Turkey, and Pakistan, also formed CENTO, which was the Middle Eastern version of NATO. There was also SEATO. All of these organizations were designed to bottle up and contain what the warmongers called "Soviet expansionism." CENTO and SEATO both disbanded, but NATO has lived on and grown in its size and scope.
As for Erdogan, he appears to be falling into the same general trend of nationalism which has pervaded multiple countries. This should have been expected, especially as the ideological tenets of the Cold War became more and more irrelevant, coupled with an active drive towards a laissez-faire global economy, which is something the West has pushed for and wanted very badly.
But as is usually the case with myopic greedheads, they didn't consider the consequences of their actions. They didn't and still don't understand the basic principles of cause and effect.