The property we are talking about is hardenability. This is the phenomenon in which a material will harden to a greater extent at any given cooling rate. The primary reason for his is that with the addition of alloying elements the resulting room temperature microstructures vary. The progression from 'softest' and least hardenable to hardest and most hardenable can roughly be listed as: polygonal ferrite, acicular ferrite, bainite, martensite.
The explanation has been already posted so I'll just add something else.
You might be having problems with this hardening, so for these steels, cooling them to the air is not an option, the solution is an oven or some heating mantles (that preserve the heat when in contact with the steel), to slow down the cooling rate, in order to maintain the optimal hardness properties
Nearly anything added to iron will increase its hardness. Most people consider carbon is considered to be the most influential, boron is very effective as a hardening alloying element. However, only minute amounts of boron can be alloyed with iron, thus the overall influence of boron is limited.
Other alloying constituents can increase the hardness of the iron alloy, but not to the same extent as the carbon. The carbon equivalency equation provides some insight about the influence of elements like manganese, chrome, silicon, copper, molybdenum, etc. There are very few alloying elements that decrease the hardness of the iron alloy system and of those that do, they typically combine chemically with carbon thus prevent the formation of martensite. To complicate the situation there are several carbon equivalency formulas. Each with its own recommendations of minimum preheat requirements.
To your question; alloy steels use some carbon, but they also use other effective alloying elements to increase hardness. Some alloying elements are used because they promote hardening to a deeper depth than carbon alone. Many martensitic stainless steels are air hardenable and are used for hot dies.
Al