Please see image A below. Previously attached was a 3-bulb fixture. I have replaced it with a 4-spotlight bar successfully by copying the previous wire configuration.
Lacking the background, the cable and wire configuration confuse me.
Please see image B below,. The old fixture had 3 live wires and 3 neutral wires running from it. These were connected to 2 cables from the junction box. One cable had 1L, 1N and 1G. The other seems to have those and an extra red (greater gauge perhaps?)
Inside the junction box, the 2 blacks were tied together and remain detached. And the 2 whites were tied together and connected to the 3 whites on the fixture (total 5 whites). Then there's the red.
It seems that the fixture is using the red (as the live?) from 1 cable and combining neutrals. Then joining the 2 black wires from these cables to form a closed loop. I believe the 2 ground wires were connected too.
If the above is correct, why was this necessary? Was it a load/consumption issue or a method to future-proof in case of expansion? What is the red wire's purpose - where does it originate from? Were the 2 blacks also live?
Insight would be greatly appreciated.
Edit: This is Canada. House was built in 1990.