The heat sink maintains the critical internal temperature of the device within design limits. For power semiconductors, this is usually the maximum junction temperature; for resistors, it is the maximum temperature of the resistance element. If these limits are exceeded, the device will not operate to specifications, or may be destroyed. A properly designed heat sink maintains that critical temperature within device limits.