Water conducts electricity, so if a device gets wet, it can short out and destroy some components. It’s like wiring every component to every other component. Bad news: Only one component in an important pathway has to die for the device to stop working.
In addition to the damage being done on contact (i.e. creating short circuits leading to immediate or near-immediate failure); tap water and rain/flood water contain a lot of impurities. The evaporated water leaves these behind which may create a delayed onset of corrosion, which can cause poor contact between components and connectors.
Distilled water is actually safe for most printed circuit boards (at least those with sealed components) as long as it is applied and completely dried before power is given to the device.