Thermal shock occurs when there is a sudden and extreme change in temperature, which can lead to cracks in quartz.