Okey so, when these coups happened in Turkey (in 1960 and 1980) army wasnt stronger than it is right now, but they had more power in the country, it was oppressive. For example in these years, u cant see pkk supporters in the streets screaming like "free kurdistan" and stuff like that, but now they can do it because of the current government, and army cant do shit without the permission of government(erdogan). So in these years if the government prevents the army, then army just shuts it down. But since AKP is in the charge a lot of things changed. And the coup was made by FETO (it is a religious communty that infiltrated to the government and to the army with the help of Erdogan, Fetullah Gulen is the leader of that group, he was so close with erdogan) So the coup didnt happen with the help of the full army, Just few generals and officers in the army. Thats the main reason why it wasnt succesfull. There a lot more things to talk about, but i hope this is enough for you, If you have any more questions, feel free to ask.