The code actually does have some specific provisions for lighting fixtures (or Luminaires).
There are a few thing to also consider.
A cord that is factory installed is considered part of the appliance, and the NEC generally does not apply to the parts of an appliance.
That said, 'lighting whips' are addressed by some code sections. 402.5 suggests that even #18 can be acceptable.
There is likewise a provision in the NEC that alows lighting circuits to be as large as 50 amps. I really doubt there are any fixtures out there with #6 wires passing through them; the final six foot run is commonly a conductor smaller than the branch circuit conductors.
From a safety point of view, it is very difficult to create a situation where a light fixture can draw more current than is safe in 16 gauge cord, but still less than enough to trip a 20 amp breaker. Typically you're either going to be drawing around the normal amount for fixture, or else somewhere around a dead short.
The code appears to take this into account in the cord and the tap rules.
This is presumably part of why receptacle adaptors that screw into an Edison-base socket are frowned upon. And also why outlet strips do require built-in circuit breakers--it is well within the realm of possibility that someone can plug enough things into the strip to overload the cord, but not the circuit.