Virtual Cube

Hello everyone!

This is my first project using arduino (or any micro controller :P).
I downloaded a full code for my 8x8x8 LED cube, but I wired my LEDs differently than the guy I copied.
He told me I should change this exact function, as it builds up the cube virtually.
I don't know anything about it besides there is a matrix cycle in it.
Could you please help me understand this function?

void renderCube() {
  for (uint8_t i = 0; i < 8; i++) {
    digitalWrite(SS, LOW);
    SPI.transfer(0x01 << i);
    for (uint8_t j = 0; j < 8; j++) {
      SPI.transfer(cube[i][j]);
    }
    digitalWrite(SS, HIGH);
  }
}

Could you please help me understand this function?

Sure. You tell us what you don't understand, and we'll explain that.

Why would you download code for a complex thing like an 8 x 8 x 8 LED cube that expects the LEDs to be wired one way, and then wire them differently?