The heat distortion temperature is determined by the following test procedure outlined in ASTM D648.
Once plastic is in the mold, it must be cooled to a temperature to which little or no dimensional change will occur after removal.
In general, plastics do not conduct heat well and so will take quite a while to cool to room temperature.
One way to mitigate this is to use a cold mold (thereby increasing heat loss from the part).
Choosing a resin with a higher heat deflection temperature (and therefore closer to melting temperature) can allow manufacturers to achieve a much faster molding process than they would otherwise while maintaining dimensional changes within certain limits.