What did Jacobi, who lived before Riemann, have to do with the equation and theorem named after him in Riemannian geometry?

In Riemannian geometry we have two very important things named after Jacobi: the Jacobi equation $J''=R(\gamma',J)\gamma'$ and Jacobi's theorem which states geodesics never minimize past conjugate points. Why is Jacobi's name attached to this equation and theorem?

This is a natural question given the modern exposition, where Riemannian geometry is often the only place where some parts of the calculus of variations are encountered. And a reminder that historical order rarely follows the order of modern expositions. Jacobi's equation, condition, fields, etc., are not specific to Riemannian geometry, they relate to the second variation of functionals in the classical calculus of variations like $\int_a^b f(x,y,y')\,dx$, the arclength functional of the geodesic problem is just a particular case. Those were in the sights of the leading mathematicians since the brachistochrone.
According to Ferguson's Brief Survey of the History of the Calculus of Variations and its Applications, Legendre in 1786 presented a memoir On the Method of Distinguishing Maxima from Minima in the Calculus of Variations, where he showed that necessarily $f_{y',y'}\geq0$ for minimizers, and $\leq0$ for maximizers. Half a century later Jacobi "in a paper remarkable for its brevity and obscurity" gave a complementary sufficient condition, $f_{y',y'}>0$ and $b$ is closer to $a$ than the first conjugate point of $a$. The paper, On the Calculus of Variations and the Theory of Differential Equations (1836),