What puzzels me is why a stainless steel oven rack doesn't go soft or break or go "bad" over time...
"Steel" is a name for a broad family of metal alloys. Steel oven racks are not made out of the same steel alloy that knives are. And, of course, there's the question of how the metal has been processed, heat treated, etc.
The goal of heat treatment is to make the metal harder. This is not magic. It's accomplished by encouraging the formation of a tigher crystal structrure. There are several ways to do this. Passing a huge electrical current through the metal can. Exposing it to a powerful magnetic field can. But heat treatment is something that you can do with relatively simple equipment. A typical heat-treatment process is to heat the metal to 1600F, cool it very quickly, heat it back to 1400F, cool it very quickly again, heat it to 600F, and then allow it to cool slowly. Heating loosens the bonds within the metal matrix and encourages the molecules to move around. Cooling causes them to settle down into a crystal matrix. To understand it, measure a cup of flour out of a sack of flour. Now sift it. Measure it again. It's more than one cup. How can this be? Because the particles of flour aren't so tightly packed anymore. If you were to introduce some mechanical energy, perhaps by tapping on the side of the measuring cup, you could ecourage the particles to pack together again. Heating and cooling the metal is like tapping on the cup. It encourages the molecules to settle into a tighter pack. And yes, the blade does shrink during this process, though not within the ability of most people to measure.
The heating can be -- and often is -- done by putting the metal into a hot fire, a forge for example. You can judge the temperature by the color of the metal. The cooling can be done by plunging the material into cold water. But these methods, while still used by many knife makers, are poorly controlled and produce inconsistent results. Modern heat-treatment is done in strictly-controlled industrial ovens. The temperatures, the rates of heating and cooling, and the times are all exactly controlled. This gives very good and very consistent results.
And heat-treatment isn't a new idea either. Men have been heat-treating metals for well over a thousand years.
It's only recently, though, that modern science has come to understand exactly what happens during heat treatment, about the crystal structure of the metal and so forth. Our modern understanding of heat-treatment, metallurgy, and crystallography have enabled us to formulate steel alloys that respond especially well to specific heat-treatment processes. Our modern facilities allow us to confect those steel alloys accurately from highly pure materials. And our modern process control capabilities allow us to heat-treat that steel with great accuracy and repeatability.
For our ancestors, though, heat-treatment must have seemed like magic: you apply a little fire, a little water, and a piece of metal dramatically changes its character. That must be magic, eh? And to further contribute to the mystery, the magic didn't always work very well. It could have been inconsistent composition of the metal or impurities in the metal, poor control of temperature, poor control of the rates of temperature change, all of these factors affect the outcome of the heat-treatment process and none of these factors were understood or well-controlled. For them, the only available explanations were, "The god's didn't favor us that day... or maybe the eye of newt wasn't newty enough." As a result, many myths and legends and superstitions arose surrounding heat-treatment, especially for edged weapons.
Imagine an ancient blacksmith who, on a Monday, hardens a sword using the process his father taught him and that usually works well. But it doesn't work very well that day. Why? Maybe because the metal contained some impurities. Maybe because he got the fire just a bit to hot this time. Maybe he was distracted by that attractive lady in the short dress who walked past the shop and so he ended up leaving the blade in the fire a few seconds longer than usual this time. Who knows? He certainly doesn't. All he knows is that it didn't work very well that day and the resulting sword isn't very good. On Tuesday, as he's about to heat treat his next sword, he feels the call of nature and decides instead of wasting time running out to the outhouse, to relieve himself in the bucket of water in which he'll be quenching the blade. For whatever reason, better steel, a slightly cooler fire, better timing, whatever, the process goes especially well that day and the sword is superb. But, on Wednesday, for whatever reason, the process fails again. He may sit down and ask himself, "Why did Tuesday's sword turn out so much better?" He may remember that on Tuesday, he urinated in the water. And without a better understanding of metal and heat-treatment, he may conclude that there's something magic about urinating in the water and insist on doing so from now on. And he'll teach that to his son who will teach it to his son and so forth.
Ancient documents are full of stories and formulas about adding magical elements to the water or the fire, about magical songs or incantations to sing or say or dance during the process (which may actually help by giving more consistent timing), about how heat-treatment must only be done by the light of a full moon (which may add consistency to the judgment of metal temperature by color), and so forth. There are even stories, probably with some basis in fact, about swords, still red-hot from the fire, being quenched by being plunged into living humans, usually war prisoners or slaves (which may give some consistency to the cooling process).
Today, our modern, consistent, pure alloys and our carefully-prescribed and fully-controlled heat-treatment processes, we get much more consistent results. But, you know what? There's still a certain element of what might still be called, "magic." It's not really magic. It's just variablilty that remains in the process. For example, a sudden power surge could cause the oven to go a little over the desired temperature or to rise a little faster than expected. So, there is still some variability in the heat-treatment results and still the need to test at least some blades occasionally.
Many modern steels are formulated specifically to respond especially well to specific heat-treatment protocols. Many modern alloys are very sensitive to heat-treatment processes. If they're heat-treated properly, the results are exceptionally good. But, if the heat-treatment process is off even a little, the results may be exceptionally poor. So, control of the process becomes very important and quality control through testing becomes even more needful. This is part of why some knifemakers will sing the praises of a certain alloy and make wonderful knives from it while another equally skilled maker may curse the same alloy and claim that it doesn't heat treat well.
Whatever the metal, when you heat it up, you run the risk of exciting those molecules and messing up their crystal structure. But it takes hundres of degrees to do that.