It squeezes the sound down so that the quiet parts are louder and the louder parts are quieter.
When you're tapping, any uneven notes stay at the same volume.
By raising the volume of the quieter notes it also makes it easier to tap with less effort.