In short ... By using a command like / fill to remove water from a particular location, blocks other than just water are not cleaned and remain as water sources. Here is an example:
The summary of the command used is as follows:
"/ fill xa ya za xb yb zb air 0 replace water"
In the example, the water is not gone because there is something besides the water itself.