It is necessary to have an undo option in case a flagging mistake is made. A quick way to process photos is to set a filter for unflagged photos and then to proceed to flag them. It's a significant interruption to the workflow it have to remove the filter, find the photo in question and to reflag it.