When the flex cable gets wet, it causes the screen to malfunction. This is usually caused by oxidation that forms. When the phone gets wet, liquid gets between the flex cable connector and the the main board plugs. The flex cable is the cable that connects the LCD to the processing board. The flex cable usually has a male adapter, the board usually has a female adapter. When the flex cable is plugged into the main board, a connection is made. If you look at the flex cable, or the plug on the main board, you will see gold contact pins- usually 50-60 of them (see picture below). Each pin has a function, and when they get wet they leave oxidation behind which "shorts out" the pins. That is usually why you will have a malfunctioning display.
Oxidation on the flex cables usually occurs when liquid gets between the connectors and dries. The liquid evaporates very slowly, and any debris left behind will cause connector pins to short out. Even regular bottled water is very un pure- and will leave oxidation behind. Oxidation can be detected as a white substance that looks "powdery" (oxidation can also be black, if the area which originally got wet is an enclosed area, like for example between the flex cable connectors). Oxidation is also conductive. So if you have 50 pins within a 1" radius and they oxidize, all 50 pins will be shorted out. If only several of the pins are oxidized, some function will not work, although the actual LCD may appear to work.
It is not just the LCD that the pins are responsible for. They are often responsible for the speakers, the vibrator, and other components and mechanisms such as the back light, dimming the back light when the phone is closed (to save battery power) etc . So if one of the pins that is responsible for one of those functions is shorted out, that particular function may not work. So if your phone got wet and the speaker (for example) does not work, the problem may not be the speaker itself, it could in fact be the connector cables, or even shorted pins on the main board. That's why its crucial to ensure all water damage is removed properly.