But in this particular instance, assimilation was not their primary goal; their goal was to avert humanity's first contact with the Vulcans, thereby preventing the creation of the Federation.
But assimilation is
always the Borg's primary goal. They don't see themselves as destroyers; in their view, they're giving other species a gift by absorbing them into the perfection of the Collective, as well as gaining new resources for themselves. When faced with a setback in assimilating the biological and technological distinctiveness of the Federation, their question would be, "How do we resolve the setback and
succeed in assimilating it?" Preventing it from existing at all would be a waste of something of value that they wish to add to their whole. It would be a loss for
them, not just for their adversaries.
Which means, of course, that preventing the Federation's existence costs them all the technology that the Federation's members developed over 2-300 years of cooperation -- one more reason why the premise of the movie is fundamentally out of character for the Borg. But I suppose they might figure that if they wait until first contact, at least Earth, Vulcan, and the other worlds will have warp capability and still be
somewhat worth assimilating.
How did the Borg know that the Vulcans wouldn't just contact humanity at some later time and still form the Federation?
Because, again, the Borg did not simply go back to destroy, but to assimilate. Remember, when the
Enterprise was caught in the temporal wake and saw the altered timeline around them, Earth was not a lifeless ruin, but a planet of 9 billion Borg drones. Picard explicitly said "They went back and assimilated Earth." So if that first contact hadn't happened, then the next time Vulcans came to take a look at Earth, they would've found a planet overrun by Borg. Or, more likely, the Borg of Earth would have already come to assimilate them.