The courts and the military in Turkey, for instance, had in the past often kept that republic on a secular path, and inclined enough towards Western concepts of separation of powers that the country was accepted into the EU. Under Erdogan however, there has been widely noted political interference with both the courts and prosecution for at least the past five years.
As for a free press, that's usually one of the first things to be compromised by a would-be dictator, and Turkey cracked down on that big time after the failed 2016 coup.
@lizkat: I know it is a quote, but I really cannot abide to see such carelessness, especially from commentators "on our side"; apart from the fact that it is plain wrong, it gives ammunition to "the other side" when "we" get such basic facts wrong.
Fact: Turkey is not a member of the EU, never was, and - at this stage - is very unlikely, surpassingly unlikely, to be considered as a candidate for opening accession talks.
Under its previous leader (Mr Ozal, a secular moderate and a democrat), talks on conditions to be met - many of which Turkey did meet, unilaterally - before opening accession negotiations, did indeed take place.
However, even the thought of the possibility of Turkish membership of the EU served to torpedo the referendum on the EU treaty to establish a constitution for Europe in both France and the Netherlands in 2005; likewise, this fear was undoubtedly a factor - though not by any means the major, or only one - in influencing the outcome of the Brexit referendum in England in 2016.
Now, personally, (a private, personal opinion, this), I think it a tragedy that the EU was not more open to the idea of membership for a secular democratic (if Muslim) Turkey.
Actually, I think that we "missed the bus" in not supporting this at the time, and deeply regret it. It would have offered an extraordinary, alternative role model for Muslim countries that wished to embark on a more democratic and progressive path - and, worse, it contributed to a political climate in Turkey where progressives were undermined (because it was clear that whatever a democratic Turkey did - and, in fairness, it did a lot around 20 years ago - to meet EU requirements, would be deemed insufficient by significant numbers of the west European electorate). Thus, national identity became increasingly defined in terms of conservative Islam, and autocratic and authoritarian traditions, as the country pivoted, or swivelled away from, the part of its political culture that looked to Europe as a socio-political-cultural role model, or source worth emulating.