This is a useful behavior if you want to reorder the lines, because otherwise you might end up with originally two lines on one, e.g. $ echo -ne "foo\nbar" | sort barfoo