The natural brittleness and poor conductivity of glass make it susceptible to cracking when it experiences a rapid change in temperature from cold to hot or vice versa. Contemplate what happens, for instance, when boiling water is poured into a cold glass jar. Because glass has a low heat-flow efficiency, the heat that is transferred from the water to the jar's bottom travels relatively slowly (by conduction) to the top of the jar. Since glass (or any other material) expands when heated, the jar's bottom will quickly swell, and — what is most critical — without a corresponding expansion in the upper part of the jar. This disparity creates a structural stress that cracks the doomed glass.
Treated glass, such as Pyrex, is much less vulnerable to shattering than is regular glass, though it, too, has its limits. Even less susceptible is Corningware. Standard porcelain, earthenware, and other pottery, however, do indeed have glass's "Achilles' heel," so it is a good idea to preheat a vessel made with one of these materials (with, for instance, hot tap water) before placing it in a preheated oven.