I'm not one for conspiracy theories and generally laugh at those who buy into them, but in this case I wouldn't be surprised if Erdogan poked elements of the Turkish military into trying it. That said, I don't think Erdogan is trying to install an extremist Islamic government but is solely into it to grab full power for himself.