Insulting the person probably serves as a filter - at that point that person either shapes up or stops committing, either of which is a better outcome for Linus than that person continuing to commit crap code for Linus to have to look at/approve. Your more reasonable comment doesn't have the same effect, so it's not the strictly better solution, depending on what Linus values.