Why is it OK to use a 50 A receptacle on a 40 A circuit?
Table 210.24 is a summary of branch circuit requirements. If we look at 210.24, we'll see which sections this table summarizes.

National Electrical Code 2008
ARTICLE 210 Branch Circuits
210.24 Branch-Circuit Requirements — Summary. The requirements for circuits that have two or more outlets or receptacles, other than the
receptacle circuits of 210.11(C)(1) and (C)(2), are summarized in
Table 210.24. This table provides only a summary of minimum
requirements. See 210.19, 210.20, and 210.21 for the specific
requirements applying to branch circuits.

As we can see, this table summarizes section 19, 20, and 21 of article 210. Also note that these are the requirements for &quot;circuits that have two or more outlets or receptacles&quot;.
In this particular case, we'll want to read through section 21(B).

210.21 Outlet Devices.
(A) Lampholders.
(B) Receptacles.
(1) Single Receptacle on an Individual Branch Circuit. A single receptacle installed on an individual branch circuit shall have an
ampere rating not less than that of the branch circuit.
(2) Total Cord-and-Plug-Connected Load. Where connected to a branch circuit supplying two or more receptacles or outlets, a
receptacle shall not supply a total cord-and-plug-connected load in
excess of the maximum specified in Table 210.21(B)(2).
(3) Receptacle Ratings. Where connected to a branch circuit supplying two or more receptacles or outlets, receptacle ratings shall
conform to the values listed in Table 210.21(B)(3), or where larger
than 50 amperes, the receptacle rating shall not be less than the
branch-circuit rating.
Exception No. 1:
Exception No. 2: The ampere rating of a receptacle installed for electric discharge lighting shall be permitted to be based on 410.62(C).
(4) Range Receptacle Rating. The ampere rating of a range receptacle shall be permitted to be based on a single range demand
load as specified in Table 220.55.

First we're pointed to Table 210.21(B)(3).



Which again tells us that we can have a 50A receptacle on a 40A circuit, so it would seem that it's allowed because it's allowed. However, if we look at the table again and read 210.21(B)(3) Exception number 2.



They both seem to point us to 410.62(C).

410.62 Cord-Connected Lampholders and Luminaires.
(C) Electric-Discharge Luminaires.
(1) Cord-Connected Installation. A luminaire or a listed assembly shall be permitted to be cord connected if the following conditions
apply:   (1) The luminaire is located directly below the outlet or
busway.   (2) The flexible cord meets all the following:   a. Is
visible for its entire length outside the luminaire   b. Is not
subject to strain or physical damage   c. Is terminated in a
grounding-type attachment plug cap or busway plug, or is a part of a
listed assembly incorporating a manufactured wiring system connector
in accordance with 604.6(C), or has a luminaire assembly with a strain
relief and canopy having a maximum 152 mm (6 in.) long section of
raceway for attachment to an outlet box above a suspended ceiling
(2) Provided with Mogul-Base, Screw Shell Lampholders. Electric-discharge luminaires provided with mogulbase, screw shell
lampholders shall be permitted to be connected to branch circuits of
50 amperes or less by cords complying with 240.5. Receptacles and
attachment plugs shall be permitted to be of a lower ampere rating
than the branch circuit but not less than 125 percent of the luminaire
full-load current.
(3) Equipped with Flanged Surface Inlet. Electric discharge luminaires equipped with a flanged surface inlet shall be permitted to
be supplied by cord pendants equipped with cord connectors. Inlets and
connectors shall be permitted to be of a lower ampere rating than the
branch circuit but not less than 125 percent of the luminaire load
current.

If you look at 410.62(C)(2) &amp; 410.62(C)(3), you'll see that it says:

Inlets and connectors shall be permitted to be of a lower ampere
rating than the branch circuit but not less than 125 percent of the
luminaire load current.

Say I have an electric discharge luminaire that is 35A. The first part says if I can find a 35A receptacle, I can use that. However, it also says that the connector cannot be less than 125% of the load. Which means I'll need a 43.75A receptacle. Since they don't exists, I'll have to use a 50A receptacle.

Also, they don't make 40A receptacles, so you'll have to use a 50A receptacle.