I think the point is to illustrate that you can pipe things into it. There exist programs that work on files, and work much worse or not at all on standard input; this example thus demonstrates more power.
(Though, alluded to below, the "-X PUT" may be totally superfluous.)
(Though, alluded to below, the "-X PUT" may be totally superfluous.)