That religious group has been ruling the country with their own politicians, lawyers, soldiers for the last 40 years however they want. Erdogan helped them gain power against real secular people and even jailed secular soldiers and journalists with this partnership. Many good people died in jail because of getting cancer.
Currently he is in a war against his old friend Gulen and clearing Turkey up from them. Both secular people and his fans support this action as that group ruined the country.
However Erdogan is upset at EU and US because they left him alone with his war so that's why he tries to provocate EU. Don't give a meaning to his sayings/actions.
Btw Kurds and PKK (terrorists) are very different. Don't get fooled by western media.