The liquid is close to the same refractive index as the film base, the liquid fills in any scratches, so as long as the emulsion is not damaged, then the scratches disappear, as they are now filled with the liquid.
This means that for base scratches, you get the actually data that is on the film, unlike software scratch removal that 'creates' data to fill in the scratches.
It saves a lot of digital cleanup work and means you get the real picture information, so it is a win-win.
You can get a similar result by soaking a film with filmguard, it fills in the base scratches and makes the lines disappear.
Top is wet, bottom is dry.