In addition to the junk you can see, invisible waste byproducts build up in the form of nitrates and phosphates.
This puts stress on the fish, making them vulnerable to disease. Elevated nitrates will stunt the growth of young fish and can interfere with normal reproduction in adult fish. Nitrates also promote overgrowth of algae. Phosphates have a similar effect. Changing the water is the best way to keep nitrate and phosphate levels low.
Wastes aren’t the only reason water needs to be changed. Trace elements and minerals in the water are important to the health of your fish as well as the stability of the water chemistry. Over time they are used up or filtered out. If they aren’t replaced, the pH of the water will drop. Furthermore, the lack of trace minerals will adversely affect the vigor and health of the fish. Giving your fish fresh water regularly is much the same as giving your kids vitamins to keep them strong and healthy.