Thermal drift is primarily caused by the thermal expansion or contraction of materials used in nanoscale instruments. Temperature fluctuations can occur due to environmental factors or internal heat generation during the operation of equipment. Different materials have varying coefficients of thermal expansion, exacerbating the drift when these materials are used together in a single device.