We have Equal Temperament (ET) because it is the only way to allow an instrument like a piano to play in all 12 keys without having to retune it every time the song changes.
Here is the breakdown of why we "sold our soul" to Equal Temperament:
Just Intonation (JT) is based on simple whole-number ratios (like 3:2 for a Perfect 5th). These sound beautiful because the sound waves physically lock together.
However, music math is nonlinear. If you start on C and tune twelve "perfect" 3:2 fifths in a row (C → G → D... back to C), you don't actually end up back at C. You end up at a note that is about 24 cents sharper than where you started. This discrepancy is called the Pythagorean Comma.
If you tune a piano perfectly to the key of C Major using Just Intonation:
In the 18th and 19th centuries, composers like Bach wanted to write music that traveled through all the keys (think of his Well-Tempered Clavier). To do this, theorists decided to "spread the dirt" evenly.
By shrinking every Perfect 5th by just a tiny, almost unnoticeable amount (2 cents), the "Pythagorean Comma" error is absorbed. The result is:
Summary: The "Democratic" Tuning. Equal Temperament is a democracy: everything is slightly "wrong," so that everyone can be "equal."
When a chord functions as a Dominant 7th, true Just Intonation requires tuning the minor 7th to the natural 7th harmonic overtone (a 7:4 ratio). To achieve this beatless resonance, the minor 7th must be lowered by a drastic 31 cents.