In a sense, the Bellman equation is a definition of $V(k)$, which might be more obvious if it's written
$$
V(k):=\max_{0\leq k'\leq f\left(k\right)}u\left(f\left(k\right)-k'\right)+\beta V\left(k'\right).
$$
The operator $\max_{0\leq k'\leq f\left(k\right)}$ tells us that, to get $V(k)$, we should find the specific $k'$ - let's call it $k'^*$ - at which the expression $u\left(f\left(k\right)-k'\right)+\beta V\left(k'\right)$ is greatest (if such a maximum exists).
To do that, and provided the functions involved have the right properties, the first step is to take the derivative of $u\left(f\left(k\right)-k'\right)+\beta V\left(k'\right)$ with respect to $k'$ and setting the result equal to zero. So,
$$
\frac{d}{dk'}u\left(f\left(k\right)-k'\right)+\beta V\left(k'\right) = 0,
$$
from which follows (after some math) that
$$
u'\left(f\left(k\right)-k'\right)=\beta V'\left(k'\right)
$$
at the maximum (given the right properties), so not everywhere, but where $k'=k'^*$.
Without further knowledge of $u$ and $V$, this gives at least an implicit rule for how to obtain $k'^*$, namely via
$$
u'\left(f\left(k\right)-k'^*\right)=\beta V'\left(k'^*\right)
$$
Because with $k'^*$ we have now found the specific $k'$ at which $u'\left(f\left(k\right)-k'\right)=\beta V'\left(k'\right)$ is greatest, we can substitute that specific value, $k'^*$, into the initial definition to get
$$
V(k):=u\left(f\left(k\right)-k'^*\right)+\beta V\left(k'^*\right).
$$
where the $\max$ operator has disappeared, as $k'^*$ evaluates the function already at the max. And we see that $V(k)$ does not depend on $k'$.