All perfect praise be to Allah
As a general rule about water, as explained in other answers on this site, it is well known that water is considered pure until or unless some impurity alters its color/taste or smell.
And about this well, scholars have explained that this well was not actually USED for such things, but the rain water or accidently these things usually used to fell into it, and this well was large enough that its water didn't changed its smell taste or color with those things. So, it remained useful for ablution.
We cannot imagine an unbeliever, even a pagan, doing such a thing,
never mind a Muslim. It has been the custom of people throughout time,
regardless of their religion, to respect water and protect it from
filth. How could we think otherwise of the people of that generation,
who were the best of Muslims to ever live? This is not in conforming
to what we know of their character. The truth is that the well was
situated in sloping ground. When the rains came, these impure
substances would be carried from the roadways and the yards of
people's houses and dropped into the well. However, due to the
considerable amount of the water in the well, the quality of the water
was never affected or altered. [Ma`âlim al-Sunan (1/37)]
For details read here.
Allah knows best