Don't take the example overly literally. Saving to file means you can read it before executing it.
That aside, it protects you from this gaping hole of an exploit mechanism. https://news.ycombinator.com/item?id=17636792