Maximum number of SN74HC165N

Herodes:
but then I did not finish: I did not just make an output in 74HC595 when I pressed a switch in 74HC165.

In your loop() function, you call writeRegisters(), so you are outputting to the 595s.
But your registers array is full of zeros.

    if (digitalRead(pin_Q7) == HIGH)
      Serial.print("1");
    else
      Serial.print("0");

At this point, you can add your logic to set or clear registers[] based on which inputs are high and low. As a first test, I would start with something simple, like setting each register to the same value as corresponding input.

Did you already test that your outputs are working? When you change your clearRegisters() function to set everything to HIGH instead of LOW, do all your outputs go high?