Problem calling a function from another function

The way I read your code:

void registerWrite(int whichPin, int whichState) {
  byte bitsToSend = 0;
  bitWrite(bitsToSend, whichPin, whichState);  
  shiftOut(dataPin, clockPin, MSBFIRST, bitsToSend);

The routine ALWAYS starts with bitsToSend at zero. If you called it with
  registerWrite(5, HIGH);it will correctly set and transfer bit 5 to the shift register.
A second later your code in runAnimation reaches

  registerWrite(6, HIGH);

Because the bitsToSend starts with zero, bit 5 is now clear(low) again, as we set bit 6.

This is "simply" fixed by putting the word static in front. bitsToSend will now keep the value of 5 to what you set it to, until you explicitly reset it.

 static byte bitsToSend = 0;

This does not explain why the test loop "seems" to work, but I suspect you expected each port to turn on in sequence and missed that the only one port on at a time was turned on when your expectation (from the way I read your code) shoudl have been that more and more turned on.