How can the serial communication influence some pins of some registers?
Because what ever you receive you send out to the shift register.
The serial input uses ASCII characters not numbers so if you send a 1 you will actually receive 49 and so send the bit pattern 0011 0001 to the shift registers.