Why do we use the Lagrangian and Hamiltonian instead of other related functions?

Here is one argument:

  1. Starting from Newton's 2nd law, the Lagrangian $L(q,v,t)$ is just one step away.

  2. A Legendre transformation $v\leftrightarrow p$ to the Hamiltonian $H(q,p,t)$ is well-defined for a wide class of systems because there is typically a bijective relation between velocity $v$ and momentum $p$.

  3. On the other hand, there is seldomly a bijective relation between position $q$ and force $f$ (although Hooke's law is a notable exception). Therefore the Legendre transforms $K(f,v,t)$ and $G(f,p,t)$ are often ill-defined.