Maybe Erdogan wants to build his own Islamic Caliphate. Democracy rarely works in Muslim countries. They prefer sharia and other medieval forms of government.
I think that the reason is not that Muslims prefer. The reason is that the level of education in many Islamic countries is very weak. To lead the uneducated mob can only use the rigid dictatorship.