Reason behind choosing the compensating resistor for input bias current in op amps
It is not dependent upon how the current flows at the output of the opamp.

We can treat the output pin as having a very low output impedance.

The calculations determine by how much the inverting input changes in voltage due to the current flowing into (or out of) the inverting input itself.  This is determined by the effective resistance of the feedback network.

By putting the same value resistor on the non-inverting input we can compensate for that error.

For example if R1 and R2 were both 2K, the effective resistance at the input would be 1K. (the two are effectively in parallel and the output pin is assumed to have zero resistance).

If the amplifier had an input bias current of 1uA this would cause a 1mV change in the voltage at the input that would cause an error as the output would have to change by 2mV to make the non-inverting input match the inverting input.

If however we put a 1K resistor in series with the non-inverting input as well, it would also change its voltage by 1mV in the same direction and cancel out the error.