Virtual earth, or virtual ground, is a concept that is essential to the understanding of feedback amplifiers. The drawing below illustrates the concept for a typical operational negative feedback circuit. The resistor values and gain value are just examples. Different op amps have different gain values, but they are all very high. Remembering that the input current is very nearly zero (another characteristic of op amps), try different values of voltage for V(-). You will find that the one on the schematic is the only value that will work.
Note that the closed loop gain here is almost exactly -R1/R2, in this case, -2. If the gain of the op amp changed by 50%, the closed loop gain would still be -2, and V(-) would still be virtually zero. The fact that the closed loop gain is almost independent of op amp gain also means that distortion will be nearly zero.
With that as a basis, consider an analog (solid state) switch in series with R2. If you put it on the left (source) side, it will have basically the full signal swing on both terminals when it is ON. If you put it on the right (virtual ground) side of R2, it will have almost zero volts on both terminals when it is ON. The ON resistance of analog switches is generally not constant over the allowable input signal range. If the resistance varies as a function of the signal, as it will when the switch is on the source side of R2, the gain will vary as a function of instantaneous signal voltage. Since Vout=-R1/R2, this will cause distortion. If you instead put the switch on the virtual ground side of R2, distortion will be minimized, since the switch will have almost no signal voltage on its terminals when it is ON.