Actually that should say "degree $\le n-1$". It is quite possible for the degree to be less than $n-1$ (trivially so if $f \equiv 0$).
$g(z)$ is a polynomial of degree $n$. For any polynomial $g$ of degree $n$, and any $\eta$, $g(\eta) - g(z)$ is a polynomial of degree $n$ divisible by $\eta - z$, so $(g(\eta) - g(z))/(\eta - z)$ is a polynomial (depending on $\eta$) of degree $n-1$, that is it is of the form
$\sum_{j=0}^{n-1} c_j(\eta) z^j$ where $c_j$ are functions of $\eta$. Moreover, they are analytic functions of $\eta$, because they can be obtained using the Cauchy integral formula by an appropriate contour integral of
$z^{-1-j} \frac{g(\eta)-g(z)}{\eta - z}$. $P(z)$ is obtained by integrating
the meromorphic function $f(\eta)/g(\eta)$ times that polynomial around a contour, so it is again a polynomial of degree at most $n-1$: the coefficient of $z^j$ is
$$ \dfrac{1}{2\pi i} \oint_\gamma \frac{f(\eta)}{g(\eta)} c_j(\eta) \; d\eta$$
For $z = z_j$, $g(z) = 0$ so the definition of $P(z)$ has a cancellation:
$$ P(z_j) = \frac{1}{2\pi i} \oint_\gamma \frac{f(\eta)}{g(\eta)} \frac{g(\eta)}{\eta-z_j}\; d\eta = \frac{1}{2\pi i} \oint_\gamma \frac{f(\eta)}{\eta - z_j}\; d\eta = f(z_j)$$