Weird led behavior?

Wait wait, did you make your circuit exactly like that in the picture? If so, no matter what, if any shift register output pin is high, all of them will turn on.

In regards to your question, maybe you had the leds in backwards and there was discharged current. Leds can also act as photodiodes if you put them in the wrong way. As the power went through your led, the voltage drop was enough to power them, but not enough to direct the left over current through the resistor, so it would go through the leds that were inserted backwards possibly?

Its generally a good practice to calculate the resistance needed and put the resistors in before the led itself because then you don't get reverse current flow like I stated.