Basically light will change direction when it changes the material it goes through, based on the difference in a property called refractive index.
Since there are many balls it will change direction going in and out of each ball in a different way so the light is heavily distorted
When water gets added the change from going to water to ball becomes almost 0 since the refractive index is the same. So it basically only changes direction once, when it goes into the water. This makes the object much clearer.