Olin Lathrop captured something important, which is that the word "burn" does not always align to the chemistry definition of the word. But I did want to answer your question.
Chocolate will burn in a "naked" pan because the heat is not evenly spread. In cooking, it's desirable to have the top surface of the pan have an even temperature across the entire cooking surface. However, in practice, that can be difficult to achieve. Stoves often provide very uneven heating to the bottom of the pan, especially gas ranges which may only heat a circle! To spread the heat evenly, a pan must be very thick, and that is costly. Pan manufacturers try to strike a balance between a pan that's thick enough to spread the heat but thin enough to be affordable. High end pans will often have several layers of metal on the bottom to achieve a more even spread.
Chocolate is particularly demanding regarding temperatures. The science of chocolate is amazing, and I highly recommend looking into it some time. Chocolateers have to work with 5 different crystalline forms of chocolate that can form when it cools, of which one of them is "the right one." Accordingly, you must have a very even temperature within your pan of chocolate. Most pans just can't meet those criteria.
The "double boiler" solves this by heating water and then using that water to heat the container with the chocolate. First off, you can create a much larger thickness of material between the burner and your precious chocolate. Instead of having maybe a quarter inch of metal protecting the chocolate, you can have 2 inches of water or more! Second, water is a liquid so it can move. The water will form convection cells which are very effective at spreading heat out uniformly throughout the liquid.
Just be careful with the steam! Chocolate is quite hydrophilic, meaning it is attracted to water. If any of the steam condenses into your chocolate, the chocolate will immediately absorb the water, which causes the chocolate to "seize" into a useless lump which cannot be used unless you heat the chocolate hot enough to drive out all the water. This temperature is high enough that it will mess up all of the crystals you were trying to form, and you will have to re-temper the chocolate again!