This is a pretty weird part of the constitution anyway. It seems like a reset clause for a country that always goes down the same route. Turkey has a long way to go.
Wouldn't be surprised if it was just made like all the "right f revolution/resistance" some constitutions have. For example like here in Germany's Basic Law:
All Germans shall have the right to resist any person seeking to abolish this constitutional order, if no other remedy is available.
Of course it's not that specific like the Turkish one with the military. But I think it's based on the same idea to make necessary stuff legal when it comes to protect the constitution.