I'm an old timer TOS fan, way before "Minshara" came into the picture. Alls I ever knew was Class M, no explanation given. But way back when I was a kid...
Why M? Only thing I could think of was M being smack in the middle of the alphabet. Class M were the planets just right for human life.
Like some kind of Goldilocks thing, I thought the 26 letter alphabet was the gamut of planets. Class A planets were way too cold, Class Z planets were way too hot, but Class M planets were just right (smack in the middle).
Arbitrary? Probably. But at least I didn't invent some Minshara planets to explain the "M".