Overdriving an audio input makes the stage non-linear, and non-linearity mixes the signal components together to produce new frequencies at their sums and differences. Measuring those intermodulation products relative to the wanted signal therefore quantifies exactly this defect.