Why was the Aswan Dam Built?

The Aswan Dam was built to regulate flood water. It was also to provide water for the agriculture. It was later used to generate electricity. The first dam was completed in 1920. The second dam was completed in 1970.