Why does does the power supply in my op-amp circuit need to be connected to ground?
There are two ways to approach this problem. One way is to look internally into the op-amp and discover what happens when the ground is present or absent.
Another approach is to treat the op-amp as a black box. That is, we completely ignore what is inside the op-amp, and try to determine the behavior from the outside.
In this answer, we will use the second approach. We will treat the op-amp as a black box.
We consider the case where the connection to ground is missing.
The algebraic sum of all the currents into and out of the op-amp must total zero, otherwise charge would be building up inside the op-amp.
Since the op-amp power supply has only two terminals, (it is not split!) the current from the power supply into the op-amp must equal the current out of the op-amp back into the power supply.
Since the power rails into the op-amp have equal current, it must be the case that the total current into the op-amp's signal inputs must equal the current out of the op-amp's output
When an op-amp is operated in its "normal" linear range, the current into (or out of) the inputs is very small. Sometimes it is treated as 0. Also, when an op-amp is operated in its linear range, the voltage difference between the non-inverting input pin and the inverting input pin will be "small".
From the above, if the op-amp is operating in its linear range, the current at its output must also be very small -- almost 0.
If the output current of a circuit is near 0, but its voltage is not, then if any load whatsoever is added to the output, it will generally have a great effect upon the output voltage.
Thus, the output voltage of the op-amp, in this configuration, will vary significantly depending upon load, rather than being controlled by the feedback network.
To demonstrate this:
simulate this circuit – Schematic created using CircuitLab
Here is a DC sweep showing how the output voltage changes from 6.8 V to 7.5 V as the load changes from 1 k\$\Omega\$ to 1 M\$\Omega\$.
[Note: I do not trust the CircuitLab model to accurately reflect how the circuit will actually behave when the op-amp power supply is "floating" relative to ground. I merely wish to illustrate how, once the output current is severely limited, the output voltage becomes dependent upon the load, and parenthetically on the absolute magnitudes of the resistors in the feedback network, and not merely upon their ratio.]
We can also see, by looking at the op-amp's inverting input pin, that the op-amp is not operating in it's linear region. If it were, the op-amp's inverting input pin would be close to the voltage of the non-inverting pin (i.e. 9.15V). Instead, it is 3 V or more away.
This explains why the output is seen to vary between 6.8 V and 7.5 V rather than being near the 12 V hoped for by the designer.
In contrast, when the op-amp supply's negative rail is grounded, the voltage changes little when the load is varied. Although the curve in the following graph looks significant, the labels marking the grid lines show that as the load varies from 1 k\$\Omega\$ to 1 M\$\Omega\$, the output voltage remains 12.04 V within +/- 0.005 V.
Incidentally, this result corresponds to the 12 V (approximately) expected by the user.