Microscopic oxygen breathing organisms will thrive in it until the oxygen in the water is used up. After that anerobic microscopic organisms take over. They release methane, CO2, and oxides of sulfur. It's the H2S and sulphur oxides that smell bad to us.
Why do reusable water bottles smell? Reusable water bottles smell because they collect odour-causing bacteria from backwash, sweat, and saliva. The odour can smell bad faster if reusable water bottles are stored in a wet area, or left with the lid sealed on for long periods of time with liquid in the bottle.