There have been some 150 tuning systems put forth over the centuries, none of them pure. There is no perfection, only varying tastes in corruption. If you want your fifths nicely in tune, the thirds can't be; if you want pure thirds, you have to put up with impure fifths. And no scale on a keyboard, not even good old C major, can be perfectly in tune. Medieval tunings voted for pure fifths. By the late Renaissance the tuning systems favored better thirds. The latter were various kinds of meantone temperament. In meantone, most of the accumulated fudges were dumped onto two notes, usually G# (aka A flat) and E flat. The shivery effect of those two notes played together in meantone temperaments earned it the name "wolf," which, like its namesake, was regarded with a certain holy fear.
And there's an explanation of why some people seem to carry on wildly about the emotional differences between different keys-- in some tunings, the keys are more different from each other than in other tunings.
Bach used well-tempering-- it's a tuning which compromises between pure intervals, which make for some very beautiful harmonies and some godawful clashes, and equal temperament, which smooths everything out into vaguely adequate. Unfortunately, we don't know which system of equal temperament he used.
Just for the fun of it, an orchestra mixes instruments with fixed tuning (pianos) and instruments which are tuned on the fly by ear (violins).
Down in the comments, Joel (a piano tuner) explains that equal temperament isn't exactly as simple as the theory suggests, at least for pianos. And...
How many times have I tuned and voiced a piano and had the pianist pronounce that the action is tremendously improved? If the pianist cannot differentiate between the sound and the action, how much more difficult is it for us to differentiate the sound of the voice from the sound of the temperament?
Dr. Sonic explains complexities of organ tuning:
Now, a subtle fact about overtones is that the overtones comprising any steady tone MUST by definition be harmonic. This applies, for instance, to the organ. And here is where even the relatively unschooled ear can hear the difference between modern and period tunings. On an organ, higher overtones can be introduced with 'stops' that open or close shorter, higher pitched pipes associated with a given key. If the stops are really well in tune with the fundamental, they will by definition be out of tune with other notes in the scale if that scale is equal-tempered. Ditto for pipes with lots of overtones; those overtones will be very out of tune with the other notes in the scale. It is almost certain that the use of certain stops and hence certain tone colors in the organ has been discouraged by the prevalence of equal temperament.
Isaiah Tanenbaum :
Just about every choir teacher instructs choirs to sing major thirds and sevenths "sharper than the piano can play," (and their corresponding minor intervals, flatter) exactly for the reasons in this article. While it's not so bad on the piano (largely because each note is actually three strings, each tuned slightly differently; your ear naturally picks the one it wants to hear), a human voice singing with perfect equal tuning sounds awful.
Frank J Oteri:
It is certainly possible to have an equal temperament in which both pure perfect fifths (3/2) and pure major thirds (5/4) are approximated within the threshold of human perception; it just can't be done with only 12 pitches. The smallest scale that does this effectively is 53-tone equal temperament! Since the 12-pitch division is much more easily navigable, compromises ensued, although not of these were limited to 12 as is revealed in "Enharmonic," an exhaustive account of microtonal experiments in Europe between the years 1490 to 1900 by the Italian musicologist Patrizio Barbieri (available here: http://www.patriziobarbieri.it/1.htm). By the way, in my photo, I'm actually performing on a Tonal Plexus keyboard developed by Aaron Hunt (http://www.h-pi.com/index.html) which has 211 keys per octave and which is optimized for use in its default tuning of 205-tone equal temperament, a system which also has perfectly in-tune fifths and thirds, although the joys are all the weird intervals in between, which I've been attempting to harness with my own improv group Tonally Perplexed: http://www.youtube.com/watch?v=UzUXP1rCJyE.
Seriously, if you're at all interested strange meditative music, check out that last link-- it's a raga.
Link thanks to The Agitator.