Ultrasonic Query

I am using ultrasonic sensors (HC-SR04) for a project, and I notice that in all of the tutorials, the trigger pin is set low before sending the trigger pulse.

void trigger(){
  digitalWrite(trigPin, LOW); //is this LOW necessary?
  delayMicroseconds(2);       //or can i run this line once in setup?
  digitalWrite(trigPin, HIGH);
  digitalWrite(trigPin, LOW); //the pin should be LOW

The only reason that I think it may be there is so that the pin starts LOW when the script fist initialises, but then, that would mean as long as you make sure to set it LOW in setup, it should be LOW during the first runtime.

I am trying to optimise the code (mainly for speed, since I actually have 16 ults), so my questions are: Am I missing something here? Could I move that trig-LOW to setup() ?

It’s a lazy cut-and-paste that has inexplicably perpetuated.
If you set the pin LOW in setup() immediately after setting the pinMode, then there is no need to write it LOW before HIGH.

If I were in a charitable mood, I’d say it’s a defensive programming measure.

I am not, by nature, charitable.

Given the sensors take several milliseconds to operate, removing a single digitalWrite() call won’t make
any discernable difference to the speed. But its unnecesary code so lose it and the 2 µs delay.