I know $I_{\text{rms}}$ produces the same energy over time as if the current were DC.
I am asking the reason why it works.
The main focus of this question is highlighted below which makes it different from similar questions.(why we take mean of square then take root instead of taking mean of absolute value of current.
Let's say the AC current is $I=\sin(t)$ for this case where $t=\omega \tau$ where $\tau$ is time in seconds. This is done to make the question simpler.
Let's say we have graph of $\sin(t)$.
It's average is zero so we square: $\sin^2(t)$.
Now be careful!
we take average of $\sin^{2}(t)$ and then we take root. Why don't we take the absolute value $|\sin(t)|$ first and then take the mean, which will give us the answer 0.637I not 0.707I.
That will actually mean that in the formula $P=IV$ we will use $I=I_{avr}$ not $I=I_{rms}$ where $I_{avr}=\langle|\sin(t)|\rangle$.