The question is "Find the Lagrange multiplier equations for the point of the surface $x^4+y^4+z^4+xy+yz+zx=6$ at which $x$ is the largest."
So I understand the constraint is the given surface, the solution gives $f(x,y,z)=x $ as the function we're looking to maximize. Which is the part I do not understand, why is $f(x,y,z)=x$ the function we need to maximize.
You shall find a point $(x, y, z)$ on the surface such that the value of $x$ is largest. This issue can be considered as a mapping
$$(x, y, z) \longmapsto x,$$
since the expression on the right hand side is exactly the one you have to maximize. If you write this as a function, you have
$$f(x, y, z) = x.$$
If you would have, for instance, to maximize the expression $yz$, then a suitable function would be
$$g(x, y, z) = yz$$
and similar for other problems.