They were in between him and Harry. He didn’t have to kill them, and he actually would have been better off if he had spared them, but he is cruel and chose to use lethal force to get past them.
They were protecting Harry killing them was the only way to get to Harry he could've waited until Harry was old enough to leave the house and then go after him, but he just couldn't wait that long.