How is sponge different from just normal file redirection?
% sed "s/root/toor/" /etc/passwd | grep -v joey | sponge /etc/passwd
If you tried this as: % sed "s/root/toor/" /etc/passwd | grep -v joey > /etc/passwd
The shell would overwrite /etc/passwd with an empty file before sed has a chance to read from it.