Voltmeters work by creating a closed circuit. For example, when you place the probes on the terminals of a battery, the voltage produce by the battery cause a current to flow in one probe, through the voltmeter, back out the other probe, and back into the battery. This is a closed loop and the electrons are literally recycled in this loop and renergized by the battery. The voltmeter measures the current with a fixed resistor and can determine the voltage using V=IR. If the current is 0 then the measured voltage will be 0, according to the equation.
So, I have two separate batteries, one being a 1.5v battery and the other being a 9v battery. The batteries are in no way connected. If I placed one probe on the + terminal of the 9v battery and the other probe on the - terminal of the 1.5v battery, what will I measure? There is no closed loop, so no current, therefore no voltage is measured. This is basically what you did with your two circuits. The batteries need to be connected somehow before you can measure a voltage.
Get a few batteries out and test this yourself. Only when you have a closed loop will you measure a voltage potential. Depending on how you connect the batteries and probes, you can measure positive and negative 0v, 1.5v, 7.5v, 9v, and 10.5v. For further learning, I recommend the app EveryCircuit so you can think up and simulate circuits on you phone.
In practice, this problem is usually solved by connecting all the ground pins together. If you connect the GND pin on the Raspberry Pi to the GND on the garage circuit, then you would see the results you expected because everything is sharing the same reference (ground). However, this can cause noise issues, can be unsafe to lower voltage electronics downstream if something failed, and will blow your circuit if you do it wrong. This is why others in the comments have suggested optocouplers or relays. This protects the low voltage (sensitive) electronics from high voltage or high power electronics like motors. If a relay, which uses both the high and low voltages, is crushed or otherwise fails, it is very unlike if not impossible to short and send the high voltage energy into the low voltage electronics. However, if a mosfet or IC that’s using the high/low voltages suddenly fails, it will behave unexpectedly and may pass the high voltage down to the low voltage electronics and cause everything to fail. Depending on your setup, this can be very expensive and/or very dangerous.