"Wanting to keep the inputs the same," is assigning a kind of intelligence that isn't really there, to simplify the approach to the problem. It's actually how negative feedback works, and not necessarily a function of the op-amp itself (it just happens to be really good at it).
OpAmps work through having unconditionally massive amounts of small signal gain. Typically, a good DC performance amplifier will have 120dB of "open loop" gain, or about 1,000,000V out per Volt of input. This is a scalar though. If you could get 1uV put into the non-inverting terminal with 0V on the inverting, you will get 1.000V out, in open loop mode (ideally).
What you actually get between the inputs is an error voltage. The output will be the voltage difference between the inputs multiplied by the open loop gain.
We express this mathematically as Vo = A(Vp -Vn) where Vp=non ivnerting, and Vn=inverting.
Suppose Vp were grounded. Vp=0, then Vo=-AVn.
Let us put a 10kOhm resistor from the node Vn to Vo. Then another 10kOhm resistor from an input called Vin to Vn.
The ideal opamp does not sink any current into the inputs, so the node voltage Vn is developed only by the currents through the resistors.
Let's do a Nodal analysis on the node Vn:
(Vn-Vin)/10k + (Vn-Vo)/10k = 0
We can multiply both sides by 10k to make them vanish:
Vn - Vin + Vn - Vo = 0
As we saw before, Vo = -AVn
Vn - Vin + Vn - (-AVn) = 0
Let's add Vin to both sides:
Vn + Vn + AVn = Vin
Simplify:
Vn (2 + A) = Vin
And let's add a test voltage to Vin, Vin=1, and choose an open loop gain of A=100,000
Vn (2 + 100,000) = 1
Vn = 1/100,002 = 9.9998uV
What is Vo when Vn=9.9998uV?
Vo = -100,000*0.0000099998 = -0.99998V
What you see with Vn= ... is that negative feedback is using the large amounts of gain to reduce the voltage seen by the node to the point that the error is as small as possible. You do not get negative feedback if you tie the same resistors to the non-inverting input, which would be the expected case with the idea that "the opamp tries to make the inputs equal" - which implies _any_ input to be equal.