Variational calculus is the language behind many "choose the best path" problems: action principles, Hamiltonian mechanics, optimization, physical modeling, and learning systems.
The useful point is structural. Once a system is described by a quantity to minimize, maximize, or keep stationary, variational reasoning explains how local changes determine the governing equations.
Mathematics noteOriginally posted 2020-05-18; expanded here around the prerequisite.
Variational calculus appears whenever the important object is not one number, but a function, path, field, or trajectory being optimized under constraints.
That is why it shows up beside classical mechanics, Hamiltonian formulations, quantum mechanics, optimization, and machine-learning objectives.