The flag in a mailbox indicates that it contains outgoing mail. If a postman sees a flag that is up she knows to stop and open the box. This way the postman doesn't have to stop at every mailbox along their route.