This is how I think about it. Suppose that $\dot C$ is a $P$-name and some condition $p_0$ forces that $\dot C$ is club in $\kappa$. Consider the set $D$ of ordinal $\alpha\lt\kappa$ such that $p_0$ forces $\check\alpha\in\dot C$. This set is certainly closed, since if $p_0$ forces ordinals into $\dot C$, then by closure it will also force their supremum into $\dot C$. But $D$ is also unbounded. To see this, fix any ordinal $\alpha_0$. The club $C$ will have a next element after $\alpha_0$, and by the mixing lemma, we can find a name $\dot\beta_0$ such that $p_0$ forces that $\dot\beta_0$ is the next element of $\dot C$ after $\check\alpha$. (This is essentially the function $f$ you mention.) There is an antichain of possible values for $\dot\beta_0$---this is the function $F$ you mention---and so by the $\kappa$-c.c. of $P$, we can find an ordinal $\alpha_1$ such that $p_0$ forces $\dot\beta_0\lt\check\alpha_1$. Now continue with $\dot\beta_1$ and $\alpha_2$, $\dot\beta_2$ and so on in the same way. Thus, the condition $p_0$ forces that each $\dot\beta_n$ is in $\dot C$, so it forces that the supremum of these $\omega$ many ordinals is in $\dot C$. But this supremum is the same as the supremum of the $\alpha_n$, and so $p_0$ forces that the ordinal $\alpha_\omega=\text{sup}\alpha_n$ is in $\dot C$. Thus, we have found an ordinal in $D$ above $\alpha_0$, and so $D$ is unbounded, as desired.