My theory teacher told me once in passing that she had written fugues. Later on people let me know that to write a fugue you need to be somewhat of a theory genius. Why is this so? What makes the writing of a fugue so hard and make the people that are able to write them such special theory practitioners?
A fugue is one of the most polyphonic musical pieces you can write. In a typical fugue there are 3 or 4 voices in play that are each treated independent melodies. While this is going on, you have to not only have to keep all the rules of counterpoint in mind for each voice and make sure the harmony always make sense, but you have a structure to keep in mind and are expected to modulate quite a bit.
A fugue always starts with what is known as an exposition where you introduce a musical idea known as the subject in one voice to start and another voice comes in with the subject in a different key known as the answer. This continues until all the voices of the piece are in then you go though several episodes which are meant to take you to different keys and are typically sequences derived from the subject. There are also several sections known as the development where the subject is restated in whatever key you modulated to.
Wikipedia has a nice article on the typical form of a fugue and what the idea of each section is and a sample analysis of a piece to help with the explanation. I will see if I can dig up an example from my theory book to help explain the form a little better.
It's hard to explain fully how much thought goes into it until you do it. You literally need to look at every note you place in every and make sure you don't have any bad counterpoint between any of the other voices and the notes and the harmony themselves are going where they need to.
Listen to a few examples and you'll start to realize what though goes into them. Here are just a few examples:
I've even wrote one recently for a composition class that you can listen to. If you are interested I can even provide a score to analyze.
Writing a fugue is a mixture of imagination, organization, and mastery of your tools.
If you are making a drawing, keeping track of the perspective, the objects you want to appear, and just what object will obscur what other object can be done using ruler and overpainting/erasing as you go. How much time spend masters erasing obscured objects?
Fugue writing is similar, except that it's not as much objects being obscured but rather object features of similar transparect objects lining up "incidentally" in perfect patterns.
It's not as much an inborn capability as much as an acquired skill set. But once you have acquired and practiced and honed it, you may still write boring fugues or mesmerizing ones. But the latter may no longer be an academic difference.