The Nile usually behaves with remarkable accuracy, rising exactly a specific number of feet year after year, at a scheduled pace. The farmers knew how much the Nile would rise at a specific day of the year. But in rare cases it went off its schedule.
In some rare cases, which happened once in two or three centuries, the Nile would rise way beyond its usual level. The farmers are than forced to flee to the harsh dessert. And once they returned they would find their cattle drowned, and their mud houses destroyed. Loss of property and even loss of lives was tremendous when that happened. If the river continued to rise beyond limits for a long time, thousands or millions would die. If it receded quickly, farmers would return to their homes to see their properties destroyed.
A more probable scenario, however, was the opposite behavior of the Nile. Sometimes it would not rise very much at all. That led to only the lowest parts of Egypt supplied with water. The rest of Egypt was thrust into a year of drought and famine.
Every year, Egyptians nervously watched the progress of the Nile from day to day. If it did not rise as fast as it should, the feeling of doom kept covering the inhabitants. The agony of suspense kept increasing until the "hundred day" mark, at which point everyone knew the river will not rise any further.
That is the reason, ancient Egyptians worshiped the Nile so much.
When the river did not rise, great starvation would follow, unless large amounts of grain were saved from previous years, or could be easily imported from surrounding lands. So Joseph saved a lot of lives and did a great service to Egypt when he told the pharaoh about the coming 7 years of drought, followed by the 7 years of surplus. At a time when the surrounding lands were struck by drought as well, they were all so lucky Joseph received a revelation about the coming drought. No wonder, the pharaoh made Joseph the second man in the kingdom and all of Egypt respected him after this.
So, Egyptians were hoping for mercy from the Nile year after year. Than, the "great Amenemhat" got to thinking. He wondered if he could do something to prevent such disastrous actions from nature in the future. And he found a solution in a deep and vast depression in the Libyan hills west of the Nile valley.
He dug up a canal from the western branch of the Nile and to that region. With a system of sluices and flood gates he was able to retain absolute control of how much water passed through. Thus, a huge reservoir of water was established, reaching the depth of the Nile at its highest point. In the year of need, the reservoir could be opened, and the land of Egypt would be supplied with the precious fluid.