The process of tempering, in both steel and chocolate, is the same. The material is heated and cooled until its internal structure is such that it can be carried by a warrior with honor. Here's how to make chocolate, or a sword, or a chocolate sword.
You can buy, or prepare, all the ingredients for a perfect chocolate bar. You can grind beans, make cocoa butter, add chocolate liquor, sprinkle in some sugar. Let that harden, even if you've ground the beans and added the finest possible sugar, and you'll get a soft, inhomogeneous mess. It won't even be a shelf-stable mess, as it will soon grow the light-brown "bloom" that you see on old chocolate bars - particularly if they're badly made and poorly stored.
If you want to stride through the world with good chocolate by your side, you have to act the same way you would if you wanted to stride through the world with good steel. You have to temper your raw substance so it becomes homogeneous and strong. Here's why.
As melted chocolate re-forms, it forms all different kinds of crystalline structures. Some of those structures are are relatively malleable and melt easily at very low temperatures. Some are stronger, and melt at higher temperatures. Some are even stronger, and more resilient. You can "seed" any of these crystals into structureless melted chocolate, and the presence of a certain type of crystal will increase the likelihood of a similar crystal forming nearby.
Tempering chocolate (and tempering steel), involves heating and cooling the material again and again, to ever higher temperatures. The first melt of the chocolate, at the lowest temperature, will cause the lowest-temperature crystals to melt. If they're cooled, they'll likely reform and make higher-temperature crystals. Heat the mixture to a higher temperature, and the crystals that melt at the slightly higher temperature will melt and fade out of the picture. The process repeats, with the chocolate being heated to higher and higher temperatures, but not hot enough to melt completely lose the highest-temperature crystals. The "weaker" crystals get melted away.
Eventually, only the highest-temperature crystals remain, seed the chocolate, and cause the entire piece of chocolate to have one, strong, temperature-resistant structure. This is why really good chocolate (and good steel) resists melting, resists changes in consistency, and has a kind of strength and snap. You've made it strong, and slightly more brittle. This is also why, if you leave good chocolate in a hot car and it melts, it will reform as mushy and oddly-textured. When you melt the chocolate completely, you destroy its microstructure completely, and it doesn't reform properly.
Top Image: David Leggett