When you want to output a newline and flush the stream
I believe performance can be different. Since endl output a newline and flush the stream it is doing a lot of work. Flush to stream is not a cheap operation. Imagine my code has a lot of endl statements then for each line I will be flushing the stream.
In comparison, if I put a "\n", then it may or may not get flushed to stream. Most likely when the buffer is full would the OS flush them to stream. This mean a flush is executed not as frequent as endl.
I understand with modern computers, flushing a stream is a trivial and cheap operation but I still prefer my "\n" convention instead.