Current ratings for wire are based on the insulation type & specs and you will find a table in the NEC. THHN for ex. is UL listed for 90 degrees C. Components that wires connect to can have max. temp. ratings too like circuit breakers for ex. (90 degrees C). 90 deg. C wire is very common for building wires (and RVs). The Code specifies the max. current
Wire can also have a "free air" rating which is literally for wire hanging in free air, like in service drops to buildings. Current ratings for "free air" rated wire can be much higher for the same gauge when used in conduit or is in a cable in a wall.
Then you've got different current ratings for DC versus AC wires. There's also some situations where the same wire gauge can have a "continuous" rating and "non-continuous" rating. Here in Canada, it's permissable on fixed heating circuits to be able to run at full current but the breaker has to be derated to 80%.