It's called a courtesy accidental.
The flat sign before the e in bar 3 is only to assure, that the natural sign from bar 2 is not valid any more. Btw. accidentals don't add, so if there is a flat sign, it will never result in having to play a double flat.