This time of the year, water suppliers often replace old sections of pipe or valves and then flush the system, or simply flush to remove sediment. They then shock the first wave of water that goes through with extra disinfectant. This first wave is toxic for aquatic organisms, and it's likely what caused your loss. By the time you replaced water a second time, the wave had passed and you got "regular" tap water again.
This has happened too many of us. Had nothing to do with filters, temperature, or pH as is often hypothesized in these threads.
It hasn't happened to me since I installed a drip system. With a drip, I inevitably catch every shock wave, but only a few gallons, which is diluted to a non-lethal dose in a large tank. Compare this to an 80% or so water change.
Sticky, this sucks. Sorry to hear.