First of all, if your circuit itself does not have a Ground (0 V) reference, just probing a wire anywhere and finding voltages just isn't gonna work because there is no reference voltage to compare it to. That is why voltage across something is called Potential Difference.
Now assuming the negative terminal of the battery is connected to Ground and the Vout too is measured with respect to the same Ground, what you have is a simple Voltage Divider.
![schematic](https://i.sstatic.net/3iWOW.png)
simulate this circuit – Schematic created using CircuitLab
So basically what you are measuring is the potential difference across the 15k resistor. Now if you didn't have that resistor and replace it with a short circuit, the current would pass unhinged (assuming short-circuit wire resistance being 0) and by Ohm's Law would result in a Zero voltage drop (V = IR = I x 0 = 0), which makes your Vout essentially zero as it is now directly connected to the Ground reference (i.e., the negative terminal of your battery).
![schematic](https://i.sstatic.net/nvgob.png)
simulate this circuit
Similarly, you can't live without the 12k too as then the battery would concentrate all its voltage across the 15k and since Vout measures across the 15k, you will get all of the 9V, defeating the purpose of the voltage division, implemented using the two resistors.
![schematic](https://i.sstatic.net/3HwfM.png)
simulate this circuit
Both of them are necessary for this particular operation as it is the unequal division of the source voltage across each resistor that results in the desired required output.
Sure, if you need all of your source voltage, don't bother plugging in resistors (but don't short circuit your battery too). Cheers!
V = IR
. The current flowing in the circuit is I = V/R = 9V / (12kΩ + 15kΩ) = 0.333mA. Therefore, the voltage dropped across the 12kΩ resistor is V = IR = 0.333mA x 12kΩ = 4V. Similarly, the voltage dropped across the 15kΩ resistor is V = IR = 0.333mA x 15kΩ = 5V. \$\endgroup\$