It is preferable to flush the buffer if you need the target of your stream to receive the data before the stream is closed.
A real-life example would be an application log, written from a stream that's always open... You may want to look at this log while the program is still running.