For the Dirac delta function, the following is true:
$$
\int_{-\infty}^{\infty} \delta(r - r_0) \, dr = 1.
$$
We use this property in the $r$-integral of $\mathcal{R}f(r,\theta)$ to derive the identity:
\begin{align*}
\int_{-\infty}^{\infty} \mathcal{R}f(r,\theta) \, dr &= \int_{-\infty}^{\infty} \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f(x,y) \, \delta(r - x \cos \theta - y \sin \theta) \, dx \, dy \, dr \\
&= \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} f(x,y) \left(\int_{-\infty}^{\infty} \delta(r - x \cos \theta - y \sin \theta) \, dr \right) dx \, dy \\
&= \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f(x,y) \, dx\,dy.
\end{align*}
In the second line, we changed the order of integration and then used the aforementioned property of the delta function, taking $r_0 = x \cos \theta - y \sin \theta$.
The identity can be understood from a geometrical perspective in the following way. Take an infinite set of parallel lines. Obviously, these lines fill up the entire space. Then the integral of the integrals of $f(x,y)$ over those lines will give the integral of $f(x,y)$ over the entire space.