What objective function is Lagrange's equation of the first kind based on?

In Lagrangian mechanics, Lagrange's equation of the first kind states that

$$\frac{\partial L}{\partial r_k} - \frac{d}{dt}\frac{\partial L}{\partial \dot{r_k}} + \sum_{i=1}^C \lambda_i \frac{\partial f_i}{\partial r_k} = 0. \tag{1}$$

Here the constraint functions are embedded using the method of Lagrange Multipliers. The method of Lagrange Multipliers is an optimization technique, used to find local minimas/maximas for an objective function given a set of constraints.

This leads me to believe that the part $$\frac{\partial L}{\partial r_k} - \frac{d}{dt}\frac{\partial L}{\partial \dot{r_k}}$$ actually comes from applying the gradient to some objective function. But I can not find any information about this function.

So my question is, is there an objective function here and how can one formulate it? Or is my premise flawed? I would be very thankful for any help or pointers in the right direction.

1. If the constraints $$(f_1,\ldots, f_C)$$ are holonomic, then OP's Lagrange equations of first kind (1) follows from an extended action principle $$S[r,\lambda]~=~~\int \! dt (L + \sum_{i=1}^C\lambda^i f_i).$$