Because believe it or not, but the Turkish army is pretty much loyal to the people and the nation. They used to have a lot of power so that htey could stop madness from ruling the nation.
Erdogan came into power and decided that the to be more Pro-EU they first had to limit the power of the military.
The EU was promoting this as well, so the power of the military got curbed a lot. Top heads got replaced by yes-men. Sure the budget grew, but only because there is a border crisis and Russia is breathing in their neck.
Everyone and their mother in Turkey knows that Erdogan is heading for a collision course, so better to take him out by a coup and hope the nation steers to the right direction.