Home-made impedance meter: what's the difference between voltage divider and active filter methods
Because the op-amp when used as an inverting amplifier has a virtual earth at -Vin, the component "Z" is driven by "IN" with respect to ground. This means that the output of the op-amp (barring it being non-ideal and also ignoring the feedback capacitor) is representative of the current passing through "Z".

So you have two voltages; the drving voltage and a second voltage proportional to Z's current.

Therefore the op-amp route is simpler to compute impedance than having a voltage applied across Z in series with Ro and a voltage across Ro that is proportional to current through the series combination of Z and Ro.

Having said all of that and given the non-idealities of op-amps as frequency gets high, the 2nd approach will, inevitably, be more accurate if a little more complex mathematically to solve.