In behavioral psychology , punishment could be anything as long as it create some level of distress for the subjects.
The purpose of imposing punishment is to make the subject associate the disruptive behavior with negative situations. When the association occurs , hey will become less likely to repeat the disruptive behavior.
Well a levee are things like dams and so it would help settlement if they were to start running out of water they could build a levee and run the water to where ever they needed it.