Previously farmers had to rely on rainfall, suffered in droughts and built their farms near rivers, which could also flood. Irrigation ditches allowed farms to plant further from rivers and more deal with flooding.
A visual chronology of Asimov's ~1500 scientific inventions and discoveries.