Flooding can occur anytime be it during day or night. By day, everyone can be warned for impending flood so they setup barriers.
But what if it were to happen at night time when everybody is asleep? Who would set up the flood protection barriers? An automated system would be the best option for such a scenario. The barrier would be programmed such that a single touch of a button can set it up.
Also its sensor can detect the rising water. Also, the complete reliability and barriers must be setup discreetly in keeping with the surroundings.