Exactly; living by the water has always been the best choice. The water doesn't even need to be drinkable.
GP's style of argument misses the important point that avoiding injuries is not a goal. The tribe that settles by the river and grows to a population of five million, but experiences flood-related losses of a million people once a decade or so, is better off than the tribe that stays in the desert and grows to a population of fifty.
Over time, as the bottom of the channel gradually rose, the river overflowed its banks. Dikes were built ever higher to prevent flooding, and in some places the river started to flow above the surrounding countryside. Today, in a stretch of about 1,100 miles, the Yellow River moves along 11 yards above the plain. But dikes do not control silting, and floods continue to occur on an ever larger scale. On more than 1,500 occasions during the [roughly 2100-year] history of imperial China the Yellow River burst its dikes, destroying farmland, killing villagers, and earning its description as "China's sorrow".
(The Early Chinese Empires: Qin and Han, https://www.amazon.com/dp/0674057341/ )
Saying you shouldn't live near the river because it occasionally drowns everyone nearby is saying you shouldn't own stocks because sometimes they go down. It's an argument that is completely insane.
If you believe the analysis in https://www.amazon.com/Early-Chinese-Empires-History-Imperia... , the Qin dynasty immediately flamed out because its institutions just didn't work in peacetime, and the Han dynasty had to develop practices more suited to a stable empire.