Unexpected Seven Segment Output

I don't understand the 'for' loop and display function. My way of thinking about this is to shift out the left digit of each display (16 bits altogether), then latch both 595s, then turn on those digits in the displays, wait, turn them off again. Then do the same for the right digits of both displays. And of course you can shift out while you're waiting. But it's not clear to me what your for loop is doing.

Also, you #include SevSeg.h, but don't use it at all.