A resistor is a cylinder two or three millimetres across. There is no room to print a number on it that would still be legible after a decade in a warm chassis, and a number printed on a cylinder can only be read from one side. A ring of colour solves both problems at once: it is readable from any angle, it survives, and it can be applied by a machine that never has to align the part rotationally.
The scheme is set out in IEC 60062, and every colour does double duty. Each of black through white is a digit from 0 to 9, and the same colour used in the multiplier position means ten raised to that digit — brown is 1 and ×10, red is 2 and ×100. That is not a coincidence to be memorised separately; it is one mapping used twice, and seeing it that way is most of what makes the chart stick.
Gold and silver sit outside the digit sequence because they have to. They are the only way the code can express a multiplier smaller than one, which is how a resistance below 10 Ω gets written, and they double as the two commonest tolerance grades. Their position on the body is what disambiguates the two jobs.