From what I have read, the German army was at the forefront of military innovation in terms of tactics and training. They had a staff college and were innovative in restructuring the army. That said, after thoroughly crushing the Austrians in a war very recently, why would they have allied with them? Were they not aware at how terribly incompetent their army was?
It is true that Germany had the strongest army but it is not as if Austro-Hungarian troops preformed terribly against the Russians or the Italians. What are you basing the terrible army on?
Further, Germany needed allies and had Russia, England, Austria-Hungry, Italy and France surrounding them. The situation leading up to the war in terms of Germany's allies is covered very well in an older post here by a deleted user.
Edit: the bot sent me a message. Should I ignore it, put in /u/deleted, or ping /u/estherke who contributed the next most to the theard but whose answer has no relevance on the question of /u/hahaheehaha ?