Resistor between vcc and control signal in a rpi controlled relay board
I am confused about R3 (10k) and why they connect it to the control signal. What function does this resistance have?

R3 is a pull-up resistor. It prevents the signal input (IN1) to be floating. With R3, IN1 will be kept at logic-hi by default (i.e. when the IN1 pin is not configured at the RPI side, or when the IN1 input is not connected physically). So, by default, the relay will not be triggered.

What happens when the control signal is HIGH? Would the circuit from above work?

From Ohm's Law, no current will flow through R3 and the opto's LED. And thus the relay will not be triggered. If IN1 is driven low then the potential difference will lead a non-zero current to flow through both R3 (around 0.5mA) and the opto's LED, so the relay will be triggered. So yes, the circuit will work as expected.

In the one below they don't use it, would it work too?

It can work, too. But if the IN1 input is not physically connected to the RPI side then the relay may get a false trigger when you touch the IN1 line by your hand. It appears that the below one trusts the RPI side to be always connected physically.