NATO has never really been about democracy as such, but the west presenting a unified front against the east block with the USSR, and then Russia after it. Turkey's been in NATO since the 1950s, and even back during the cold war they weren't all peachy in that regard with military coups about once per decade as islamists came into power.