The new water or the water bucket could have been dirty, tiny harmless air bubbles or you changed too much water (over 25%) and killed off the beneficial bacteria.
In most situations the water should be clear after changing. If there are purifying agents in the water it's better to not use tap water. That will solve the cloudiness.