This is because liquids do not support a shear stress and so once the soil liquefies due to shaking, subsequent earthquake shaking (transferred through ground by shear waves) is not transferred to buildings at the ground surface.