The least action principle in (mathematical) physics says the following. Given a system, e.g. collection of particles, whose motion satisfies a known system of differential equations (of second order). Then there exists a so called action functional $S$ on the space of paths of all the particles such that solutions of the above differential equations are precisely the critical paths of $S$. Moreover in all known to me cases it is assumed that $S$ can be chosen in the form $$S=\int L(x,\dot x,t)dt,\,\,\,(1)$$ where $L$ is called Lagrangian.
The least action principle is satisfied in this form for many problems of interest in physics, but not for arbitrary system of differential equations.
Question. Why it is important that $S$ has the form (1) for some Lagrangian? Are there situations of interest in (mathematical) physics where the action functional is not given by any Lagrangian?
Remark. If one takes the action functional in the form $$S_1:=\exp(S)=\exp(\int L(x,\dot x,t)dt)$$ then $S_1$ and $S$ have obviously the same critical paths.