The orbit is in 2d and "oscillates" between a minimum and a maximum $r$. The position in the plane if given by $(r(t),\phi(t))$ but here $t$ has been eliminated and you have $r(\phi)$.
As you go once from $r_{min}$ to $r_{max}(\phi)$, the body will advance along the orbit by an angular distance $\Delta \phi$. As you go from $r_{min}$ to $r_{max}$ and back to $r_{min}$, you advance by an angle $2\Delta \phi$.
To get a closed orbit, you must eventually come back to your starting point, meaning you must make an integer number $b$ of trips between $r_{min}$ and $r_{max}$ while advancing by an integer multiple $a$ of $2\pi$. This is the geometrical origin of the $2\pi a/b$ factor.
Edit: In answer to a comment, two situations are illustrated below. In both cases $r_{min}=1$ and $r_{max}=3$, and these values are shows as red thick lines. These values restrict the orbits to a ring of inner radius $1$ and outer radius $3$. The radius oscillates between $1$ and $3$ with some frequency $\omega_r$, as can be seen by the black lines in the figures.

The parametric equations for the figures on the left and the right are, respectively,
$$
r(\phi)=2+\cos\left(\sqrt{3}\phi\right)\, ,\qquad
\hbox{and}\qquad r(\phi)=2+\cos\left(\phi\right)
$$
In the first case, the ratio $\omega_\phi/\omega_r$ is not commensurate since $\sqrt{3}$ is irrational, and the orbit does not close. The best way to see this is to note that the start of the parametric curve is at $r=3,\phi=0$ but, at the end of the curve, $r\ne 3$. Because the ratio $\omega_\phi/\omega_r$ is irrational, the orbit would eventually densely fill the ring.
In the second case, on the other hand, the ratio $\omega_\phi/\omega_r$ is commensurate, and one can show (if we follow the curve through its $\phi$ evolution) that in fact it goes from $r_{min}\to r_{max}\to r_{min}$ exactly once when $\phi$ goes from $0\to 2\pi$.