piping into a for loop doesn't make sense in any language or platform afaik. Piping is literally "take the result as first argument of the next function". In many prog languages you don't even loop over an object.
Wrapping a for loop in a function at least make it a clear operative unit.
Not everything should be done with pipes.