I knew of a length of watermain installed with a tree branch inside. Think "kids screwing around on a construction site". It wouldn't pass testing no matter how much chlorine was pumped in. They finally localized the zone and dug it up.
I imagine a dead leg would cause the same amount of consternation
In my local case, I think it was a water slide the city put out in the warm months. They were using some sort of chlorine alternative for the water system that apparently wasn't as good. Then the line in the area of the water slide had "piping dead legs that rarely got circulation so they never saw any treatment chemicals. The report I saw for the aftermath seems to point to a combination of things which is usually the case with things like that.
The end result for my neighborhood was a boil water notice, the city handed out cases of water each day for residents, and the water smelled strong of chlorine for weeks afterward. It was a good experience to try to use water bottles, but I didn't keep doing that the entire time.