For one thing, it allows your pipeline to both read from and write to the same file, as it defers the output until there is no more data to read from "upstream". For instance, this won't work (it truncates the file for writing before it is ever read):