If gravity is the attraction between masses, then why two hanging masses do not appear attracted to each other? Because there is a really huge mass (the Earth) below both masses, attracting both masses with a much significantly larger force compared to that between each other.
The Schiehallion experiment used a massive mountain as one of the masses. And they were able to measure the effect, called the vertical deflection.
The Cavendish experiment controls the vertical attraction from Earth out of the equation. Therefore, we can observe and measure the weak and slow horizontal attraction between the masses, without interference from Earth.