R2 makes the circuit work and sets the "gain" or ratio between output and input voltages. Forget the diode for a moment, it is not necessary for mentally analysing this.
The op-amp is in an inverting configuration, so the op-amp output wants to do everything it can to keep the inverting input at the same voltage than the non-inverting input, which is 0V (ground) in this case.
If there is no resistance R2, any positive the voltage at inverting input is set by the voltage source only, and the op-amp output cannot influence it via the R1 resistance.
This can also be seen from the inverting op-amp gain equation: Vout = -Vin * R1/R2 so no resistance there would divide by zero so you can't have zero there.
The op-amp output would saturate at negative rail, trying to pull the inverting input towards 0V that is at non-inverting input.
If the circuit is assumed to be ideal, indeed the op-amp output would be minus infinite volts and current would be infinite, because even infinite current can't bring the voltage at inverting input down to 0V.