Why did the first civilization developed in river valleys?

The first civilizations were developed in river valleys because there was plenty of water, and they could see their enemies coming up from the side of the valley.