So, as the title says, why is the Hamiltonian the Legendre transform of the Lagrangian?
I know that from quantum mechanics, one can start with the Hamiltonian defined as the generator of time evolution, create the Hamiltonian path integral, and then integrate out the momenta and identify the remaining "object" as the Legendre transformation of the Hamiltonian. So if the Lagrangian is defined as the correct object to out in a the path integral (ie a path integral that only integrates over the different paths of the coordinate of the particle), the above gives the relationship between the Hamiltonian and the Lagrangian.
However, from a purely classical point of view, when one usually starts with the Lagrangian as defined to give the correct equations of motion (or by T-V), I have trouble understanding why the Hamiltonian is defined as the legendre transform. I know that the Legendre transform and this definition of the canonical momenta switches from Euler Lagrange equations to the Hamilton Jacobi equations and that these happen to be two convenient ways to parametrize the dynamics. But is there a better motivation why one performs the Legendre transform on the Lagrangian?