IIRC its to detect frequencies around 6400Hz which are inline with the shockwave attributed to detonation of the air fuel and leads to a breakdown of the boundary layer in the combustion chamber.
Most dont really work much past 5000rpm though due to the noise of the engine masting the noise.