Turkey is part of Nato because of a historical anomaly when it was a neighbour of the Soviet Union and was ruled by Baath party like pro-western governments. Erdogan and Akp have always been the biggest opponent to that ideology. Even before Erdogan, Islamists tried many times to gain power in Turkey through elections but that was thwarted by the pro-western military.Turkey is part of NATO for one. These guys can talk tough all they want but when the pressure is turned up, we know who they will side with.
That pro-western, US kowtowing Turkey is gone now. Turkey under Erdogan is heavily anti-west. It has the tech and GDP to become the new leader of the Middle East.