Hello Tangsuksant!
In this specific case that the values of x are only zero or one, this multiplication doens't matter, but if you're dealing with different values, this controls the magnitude and direction (sign of x_i) of the rotation on the separating hyperplane that we are searching. heres a great detaliled explanation:
https://stackoverflow.com/questions/50435809/perceptron-training-rule-why-multiply-by-x