River excavation to prevent river erosion, What is the logic?