During riots, an epidemic is a common thing as people are inattentive to their lifestyles at that time.
First, it starts with a small group of affected members before it spreads and becomes uncontrollable.
No matter how polluted the air is, or the food source isn't contagious as not everyone eats the same thing.
Due to air pollution, people might suffer from breathing problems and lung diseases, but not everyone will feel ill by this.
Thus, the only option was water.
As the water is coming from the same source, all of the people who drink it would be equally affected.
Even if there are companies that supply pure water by purifying them with magic, that isn't possible for small states as hiring a magician costs a lot.
Even if the emperor had appointed magicians for every single state, it might be impossible for one single person to purify a large scale of water.