What is the use of these resistors in the schematic?
The LM393 output can only be either pull the output to ground, or open circuit.  If the output would be open circuit, then the base of Q1 and Q2 would be floating.  R3 and R4 pull the bases of Q1 and Q2 to the supply rail when the LM393 float their output so that the bases are not floating.