To prevent rivers from flooding their banks, typically a system of dikes or levees are constructed, whereby dirt is piled up to form an artificial barrier. Sand bags are added to the dikes when rivers are so engorged that the dikes are incapable of holing-back the rising waters. This is pretty low-tech, but it has been an effective means of restraining floods for over a thousand years. However, with the biggest floods, those that occur no more than once every fifty years or so, the dikes can, and often do, fail to some degree. That's what has happened this summer on the Yangtze River.
Water rising over the dikes is one form of failure.
Another fear is the dikes bursting from the force of the great volume of water pressing against them. A gallon of water weights a little over 8 pounds, and a cubic foot of water weighs approximately 62 pounds, which means there's about 62 pounds of downward pressure on each square foot of surface. Because at a given depth the the pressure in any direction is the same as the downward pressure, if the water is 50 feet deep, the pressure is 3100 pounds per each square foot of surface. If the water is 50 feet deep, the pressure is 3100 pounds per each square foot of surface. Furthermore, erosion over the years and neglected repairs left many dikes susceptible to failing.