It is a kinetic term not a potential term, and it is there because the angular degrees of freedom are present. If you write the kinetic energy term in vector form and expand it in terms of the components in polar/spherical coondinates you would inevitably get that angular momentum contribution.
Let's first think about what kind of generalized coordinates are relevant in this system. There is $\mathbf{r}$ the position and $\dot{\mathbf{r}}$ the velocity vectors. Since the system is spherical/circular symmetric we can use an appropriate coordinate system as follows:
$$
\mathbf{r} = r \; \hat{\mathbf{e}}_r \\
\dot{\mathbf{r}}=\dot{r} \; \hat{\mathbf{e}}_r + r \dot{\theta} \; \hat{\mathbf{e}}_\theta
$$
where it is in 2D, and $\hat{\mathbf{e}}_{r,\theta}$ are the basis vectors and depend on the angle, $\theta$.
So, there are basically two generalized coordinates, $r$ and $\theta$, and, hence, should be two generalized velocities, as well. As you can see, the derivative of the position vector has an angular component. This angular component will contribute to the kinetic energy, $T$, as the following:
\begin{align}
T &= \frac12 m \dot{\mathbf{r}}^2 \\
&= \frac12 m \dot{r}^2 + \frac12 m r^2 \dot{\theta}^2
\end{align}
where I used the orthonormality condition of the bases. The first term is just the linear kinetic energy while the second term is an angular kinetic energy. If you express the angular momentum in polar coordinates,
$$L=mr^2 \dot{\theta}^2$$
then it is obvious that the second term would be just
$$
\frac12 \frac{L^2}{mr^2}
$$
Moreover, it could be expressed in terms of the moment of inertia, $I=mr^2$, and have a similar form to the linear kinetic energy in terms of momentum, $\frac12 \frac{p^2}{m}$. Therefore,
$$
E=\underbrace{\frac12 \frac{p^2}{m}}_{linear} + \underbrace{\frac12 \frac{L^2}{I}}_{angular} - \frac{GmM}{r}
$$
where the second term would vanish if the system didn't have a gravitational potential ($M=0$) or the masses are just linearly falling towards each other ($\dot{\theta}=0$, i.e. angle is constant).