That gives you only the equation of motions for a test particle, i.e. the geodesic equation.  The field equations are another thing.  I think historically there was a lot of guess work.  But using that the sources of the field are the energy&#x2F;momentum density you can make them plausible:  looking for a divergence free 2-tensor that depends on the curvature the Einstein tensor is easiest choice.  The coupling constant can be determined by looking for the non-relativistic limit which must be identical to Newtons law.<p>On the other hand, the Einstein-Hilbert action[1] is so beautiful it just has to be right :)  It simply says that the the solutions to the field equations are the stationary points of the averaged scalar curvature.<p>[1]  <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Einstein-Hilbert_action" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Einstein-Hilbert_action</a>