V'Ger probably did it to prevent Spock from interfering further.
Like I said, either Vejur was finished with the computer, or the damage had been done. If Vejur had continued (or attempted) to scan the computer after attacking Spock, your explanation would fit.
Or maybe V'Ger was trying to prevent Spock from interfering in anything it was trying to do, not just scanning the computer.
The creatures on board Enterprise were an infestation. V'Ger, even if it was an emotionless machine, would punish/destroy the infestation if it got in the way.