As the above posts indicate, the issue is a lot more complicated than it first appears. If you dig deeper, the history behind tuning is a mess, the maths is a mess, and the theory of consonance - again a mess - and not fully understood.

I'll have to disagree with the view that equal temperament (12-ET from now on) is inherently out of tune. Yes, 1.5 might look better than the irrational 1.4983..., and 1.25 'looks' better than 1.25992 for the Major third, but many important numbers in maths are irrational - like pi and e.

To my ear, 1.25992... sounds 'sweeter' than the Just Intonation equivalent - 1.25. Don't get me wrong, pure ratios are ideal for creating unique timbres (the basis behind the harmonic series), but I am suspicious whether this ideal should be carried over to melody and chords.

So if 12-ET isn't based on Just Intonation, then where does the number 12 come from? Put simply; Why are there 12 notes in the chromatic scale? My pet theory is that you can perfectly surround a sphere with 12 equally sized spheres. Coincidence maybe? You decide...

By the way, the reason why it's impossible to tune a piano properly isn't because there's anything fundamentally wrong with 12-ET. It's because the lower notes on the piano form slightly inharmonic overtones. These overtones will then clash with the higher notes - making the piano itself imperfect. Because of this, it's necessary to compromise the tuning by 'stretching' the octaves slightly. However, it's important to note that this type of compromise is not to be confused with the type of 'compromise' that is usually associated when comparing Just Intonation and Equal Temperament. Yes, confusing I know.
Incidentally, it goes without saying that synthesized sound doesn't suffer from this 'piano problem', as all harmonic partials can be tailored to exact specified frequencies.

Finally, there's a third type of 'compromise'. It's well known that two tones played together will produce extra 'unwanted' frequencies such as summation tones, difference tones, interference beats, not to mention the phenomenon known as virtual pitch (which is based on the harmonic series). Anyway, upon closer study, it turns out that both Just Intonation and Equal Temperament (and every other tuning) 'suffer' from these added 'flavourings'. Thankfully, these extra tones are very quiet and are barely (if at all) noticable in music.