2 relay switching with one button

I’ve the following strange situation with my suiduino lotus
I connect a microswitch to Grove port D2 and one to D3.
I connected the dus relay-board to Grove connector D4

The original program is:
//Relay controll

Void setup ()
{
pinmode (2, INPUT);
pinmode (3, INPUT);
pinmode (4, OUTPUT);

}

void loop ()
{
if (digitalRead(2)==HIGH
{
digitalWrite (4, HIGH);

}
if (digitalRead(3)==HIGH
{
digitalWrite (4, LOW);

 }

}

This is working very well and switches one of my relays on the 2 relay-board on and of.

I want 2 relay switches on and of at the same time
So I changesd the program like

//Relay controll

Void setup ()
{
pinmode (2, INPUT);
pinmode (3, INPUT);
pinmode (4, OUTPUT);
pinmode (5, OUTPUT);
}

void loop ()
{
if (digitalRead(2)==HIGH
{
digitalWrite (4, HIGH);

digitalWrite (5, HIGH);

}
if (digitalRead(3)==HIGH
{
digitalWrite (4, LOW);
digitalWrite (5, LOW);
}

}

}

I simply put pinmode 5 to the original program
But I don’t understand it. It is working but how. I did’t connect anything to Groveport D5
But I use pinmode 5. for switching the second relay. I thought it was the white channel in the grove cable and the yellow one was pin 4
But the, I realize that I do’n’t use grove connector D5 at all. So, how is it possible that it is working and switching the second relay.

Is it also possible to us e a kind of splitting cable so that I can connect 2 relay’s on one grove port. Thern I did not haver to use the “pinmode 5”

thanks in advance

Coen Rijn