System with two buttons

It is not a real problem but i want to know why
Here is the code

long randNumber;
bool button_state1,button_state2;
int button_pin1=2;
int button_pin2=3;
int score=0;
 void setup() {
  Serial.begin(9600);
  pinMode(button_pin1, INPUT_PULLUP);
  pinMode(button_pin2, INPUT_PULLUP);
  randomSeed(analogRead(0));
}

void loop() {

  randNumber = random(1,3);
  button_state1 = digitalRead(button_pin1);
  button_state2 = digitalRead(button_pin2);
  Serial.println(randNumber);
  Serial.print("button state 1 = ");
  Serial.println(button_state1);
  Serial.print("button state 2 = ");
  Serial.println(button_state2);


  if(randNumber==1 && button_state1==0 || randNumber==2 && button_state2==0)
  {
    score++;
    Serial.println("You did the correct move");
    Serial.print("score= ");
    Serial.println(score);

  }
  else
  {
    Serial.println("You did not make the correct move");
    Serial.print("score= ");
    Serial.println(score);
  }

  delay(10000);
}