Take a look at this site:
American wire gauge - Wikipedia, the free encyclopedia
Here's a hand waving argument on why all this is confusing. When you run current through a wire, it heats up. How much depends on the amount of current and the size (gauge) of the wire. The wire then has to get rid of this heat. The more it can get rid of, the cooler it is. If it is in the open air, like power lines that run down the street with no insulation on them and on glass insulators, the wire can get rid of a lot of heat and everything touching the wire can handle a lot of heat.
If the wire is in a bundle of wires, and that is near the top of the insulation in your attic on a hot sumer day, it's harder to get rid of the heat and you have insulation and other things touching the wire.
Things touching the wire means more than insulation. Connection points such as switches, plugs, outlets and disconnects, have a temperature rating on them just like insulation does. A popular disconnect is the Square-D disconnect which has a temperature rating of 75 degrees on it. Now look at the AWG table entry at that web site.
Note that the next to last column has ampacity with three different temperature ranges on it. Note that the "standard" amp capacity of wire as you would use in a household situation often corresponds to the 60 degree Centigrade value (140 degrees F). Those "standard values" (i.e. 12 gauge=20 amps, 10 gauge = 30 amps and 8 gauge = 40 amps) combined with minimum temperature ratings of 60 degrees C on most things you buy to wire a house let you connect things up without thinking (too much).
My 10 KW resistive electric heaters on my heat pump use a #6 wire with a 60 amp breaker. This works because the disconnects, breakers, and termination points in the heat pump have a 75 degree C rating (167 F). Note that the box stores will say that a #6 is good for 55 amps because they have to play it safe because we graduate 10 times more lawyers than engineers in this country.
More googleing of wire size ampacity will bring of lots of conflicting charts, all because they are running on different sets of assumptions. One fun one I saw was one that has the "fusing current" for a #10 at over 300 amps. If you've seen MAP gas used to braze copper, you know that's a pretty useless statistic because copper that hot would start a fire well before it melted.
From another table I have: 14 gauge wire, used with 15 amps circuits in the home, has an open air rating of 32 amps and a bundled rating of 17 amps.
In addition to the wire gauge, there are factors such as the insulation temperature rating, temperature rating for all devices connecting to the wire, the ambient temperatures the wire will see and how easy is it to get rid of the heat (bare wire, insulated, bundled, bundled and in an attic) that must be considered. Making matters more fun is the fact that the resistance of copper wire rises with temperature, aggravating the situation a bit.
So 40 amps on a #10 could work if the insulation was the right rating, the connections to it were the right rating (not hard with a ring connector crimped or soldered correctly), it was not buried in a wiring harness, didn't get run over the top of the engine, etc. There may be other information such as the fact that the actual draw on the connection is less than 40A except during brief periods where motors spin up and incandescent lighting turns on.
So there is the hand waving argument. I just want to create awareness of the factors in play here and hope the real electricians in the crowd won't toast me (and I don't mean with a beverage). For me, when I wire stuff, I use the household AC current ratings (as in 30 amps on a 10 gauge) and use 105 degree C 600V insulation stranded wire or SO cable if below 10 gauge. I like the 600V insulation for both it's higher rating and it's bigger size which is better mechanical protection. It really sucks when your wiring harness protects your fuse. A few bucks more and the fuses and everything works as it should without setting the tractor on fire. If it's a closed system where I have full control of everything, I do the math as I suspect Painless has done too.
Pete