I have to agree with John.. As far as I know it was so the inspectors could easily identify circuits that are "different" in new construction, as in Blue NM for the arc fault circuits and yellow for the 20A kitchen circuits. Also according to one inspector I talked to and almost got dinged for was to identify voltage! Anything with a red covering contains red and black conductors and is "supposed" to be 240V, no neutral, and explained that its to prevent anyone from thinking the "white is neutral" when in fact it is not such as if you used a regular piece of 2 conductor N.M with black and white conductors on a 240V circuit. That is where I almost got dinged but the inspector "let it go this time" and laughed a bit while saying so!
Years ago I can remember they had plastic sheathed NM in 3-4 colours and even way before that in the days of paper wrapped "loomex" they had what 7 colours that I can think of off the top of my head that were used throughout the years but I think it was only a manufacturing thing back then, the sheath colour meant nothing.

Personally I like the idea of colour coding the cable for the obvious reasons, but it also helps me identify what coils of what cable I have in my van at any given time!

A.D