One of the things that really bugged me when I first came across the "rules" was that nobody ever explained to me the actual musical reasons for these rules to exist in the first place. It was just a case of "Bach, Handel, Haydn etc. did it. So should you."
I think it would be good to offer some explanations for the existence of each of these rules. I'll offer what I understand the reasons for each one to be. Feel free to elaborate/correct me.
1) Parallel Unisons and Ocatves: This one stems from the idea that in polyphonic vocal music, all parts were thought to be of equal importance and should therefore be equally distinguishable and individually defined. As 2 notes an octave apart are fundamentally the same note, two voices moving in parallel octaves or unison lose their independence and effectively become one voice.
2) Parallel fifths: Same reason as 1). After the unison and the octave, the fifth is the next most consonant interval. Parallel fifths have the same effect of diminishing the individuality of voices.
3) Never double the leading note: The leading note wants to resolve upwards to the tonic. If you double it, you will either find yourself with parallel octaves/unison by resolving both upwards, or one of the leading notes will have to fall a 3rd to resolve onto the fifth of the tonic chord (This kind of resolution actually happens quite often in Bach chorales when a dominant 7th chord is used at the perfect cadence to ensure that the tonic which follows contains all 3 notes of the triad. It is resolved in this way for a good reason and never because the leading note has been doubled.)
4) Never double a sharpened or flattened note: Same principal as 3). A sharpened note naturally wants to continue upwards to resolve, while a flattened note naturally wants to resolve downwards. If you double either, you run the risk of parallel octaves/unison or an otherwise poor resolution that sounds unnatural.
5) Never double sevenths/ninths: Again, this is the same principle as the previous two rules. Added notes, such as sevenths and ninths, are suspensions that naturally want to resolve downwards. Doubling will lead to parallel octaves/unison or poor resolution.
6) Melodic augmented seconds are to be avoided: I was never 100% on the reasons behind this one. These are some of the possible reasons for it that I can think of:
1. Stylistically, it sounds out of place in Western classical music (though a lot of composers have made use of it). The reason for this may have something to do with the fact that the interval isn't found in any of the ancient modes that modern tonality developed out of, so it would sound odd to ears that weren't accustomed to it.
2. Some may argue that it is enharmonically the same interval as a minor 3rd and should therefore sound okay, but before equal temperament developed (which is when most of these "rules" were actually being put into practice), enharmonic notes such as G#/Ab, or C#/Db would have actually been noticeably different in pitch from one another. So the augmented 2nd, F-G#, would sound out of tune compared to the minor 3rd, F-Ab.
7) Avoid the Augmented Fourth melodically: The interval was avoided simply because of its dissonance but this rule was observed less and less in music as time went by. It would certainly sound out of place in a Bach chorale but it has often been used melodically since then.
8) Skips larger than a sixth must be followed by a change in direction: This is just a general guideline for good melodic writing. The ideal contour for a melody should be a wave or an arch shape. This can be heard in vocal music. A vocalist naturally wants to exert energy, i.e. move upwards in pitch, towards the climax of a phrase, before resolving tension and recovering to end the phrase, i.e. descending in pitch. Another reason for turning back when specifically skipping a sixth, is that if you move a step in the opposite direction, you form a perfect fifth with the first note, so it is basically a decoration of a melodic fifth.
9) The interval of a fourth against the bass is forbidden: The interval of a fourth isn't naturally present in a triad that is formed in accordance with the harmonic series. While the fourth is viewed as a consonance (this wasn't always the case), it is only used as a consonance because it is the inversion of the perfect fifth, and therefore can't realistically be avoided. It should be avoided where possible. The really obvious exception is the 2nd inversion tonic chord that often occurs before the dominant chord in a perfect cadence. The "dissonant" effect is exploited in that case for musical reasons, with the fourth resolving to a major third in the dominant chord.
10) Dissonances such as sevenths should resolve downwards: Again, this relates to the releasing of tension, which is more naturally achieved by moving downwards rather than upwards.
11) Always double the root of a root position triad: I don't really have a reason for this one but it sounds like a good rule of thumb, though breaking it is often unavoidable so it shouldn't be worried about too much I guess.
12) I would say that if there is a 12th rule it's this: These shouldn't be thought of as rules. They are guidelines for writing successfully in a certain style from a certain era. They are necessary for any composer to know and be able to put into practice but be aware that to obtain the best musical results, every single one of these rules will need to be broken at some point or other.
That's what I understand the reasons for these "rules" to be. I'm sure some others here have some insights they could add that could be of use to beginners.