This question is more about conception/modeling than mathematics, however its still mathematics. Every time that I read about calculus of variations I usually found a functional of the following form $$ F(g):=\int_{a}^b L(t,g(t),g'(t))\,d t\tag1 $$ where $g\in C^2[a,b]$, $g(a)=x_1$ and $g(b)=x_2$ for fixed points $x_1$ and $x_2$, where $a$ and $b$ are assumed fixed but arbitrary. Thus $F$ gives a value related to some path between the points $x_1$ and $x_2$. Now using the Euler-Lagrange equations we can find some candidates for some optimal path in the sense that it minimizes $F$.
Now suppose that $t$ is "time", then for many functions $L$, the optimal path that minimizes $F$, besides a trivial re-parametrization of time by translation, will depend on the total time $b-a$. This seems too restrictive if we want to find an optimal path from all the possible paths that join $x_1$ and $x_2$, that is, why its customary to assume the total time of a functional like (1) to be fixed? Its not more optimal (and natural) to just find the path that minimizes (1) for variable time $b$ (maybe with the restriction that $b\geqslant b_0$ for some fixed $b_0$)?
In other words, how could be useful a model where one assumes the total time of a trajectory a priori? This is not unnecessarily restrictive?
On one hand, the stationary action principle uses a fixed time region $[t_i,t_f]$. (We can of course reparametrize time via substitution, but that just amounts to kicking the can down the road.) If we try to vary the initial time $t_i$ and/or final time $t_f$, i.e. let them be arbitrary, then the variational problem often becomes ill-posed.
On the other hand, there exist variational problems where the time region $[t_i,t_f]$ is free, but in that case it is often needed to fix the conjugate variable (=frequency/energy), cf. e.g. Maupertius's principle.