The standard is for the MOTOR, not the wire size, meaning that if you can get your motor to pass the tests with wire that ends up smaller than the NEC would allow, that's fine, because the entire MOTOR is tested as an ASSEMBLY. But at the same time, a motor designer will not want to take too much of a chance because that testing is expensive and having something fail because you scrimped too much on the conductor size is the kind of thing that gets you a pink slip.
Motor wire manufacturers publish guidelines for their brands of wires to help those motor designers, here is one:
http://www.ecswire.com/mmspecs/Specsheets/Belden/leadWireSelectionChart.pdf
As you will see, using your example of #8s observed in a 40HP motor, #8 per the NEC is good for 50A without any adjustment factors, but for the motor lead wires, using the 3 conductor chart (#3), it's good for 76A if using EDPM 150C lead wire. Even this isn't that simple, there's a lot more to it. Bottom line, again, you can't equivocate the wire sizes used per the NEC to what is used INSIDE of the motor.