[proofplan]
This is a direct corollary of the [Sum of Orders Is Zero](/theorems/2176) theorem. We unpack the definitions: the degree of a divisor $D = \sum_p n_p \cdot [p]$ on a smooth projective curve over an algebraically closed field is the integer $\deg D = \sum_p n_p$, where the sum is finite because divisors are by definition finite formal $\mathbb{Z}$-linear combinations of points. By definition of $\operatorname{div}(f)$, the coefficient at $p$ is $\operatorname{ord}_p(f)$, and the support is finite because $\operatorname{ord}_p(f) = 0$ for all but finitely many $p$ (this is part of the cited theorem). The sum-of-orders identity then reads $\deg \operatorname{div}(f) = 0$.
[/proofplan]
[step:Verify finiteness of the support of $\operatorname{div}(f)$]
Let $f \in \mathcal{O}_C(\eta)^\times$ be a nonzero rational function. By [Sum of Orders Is Zero](/theorems/2176) (whose hypotheses — $C$ a smooth projective irreducible curve and $f$ a nonzero rational function — are satisfied), the set
\begin{align*}
\operatorname{Supp}(\operatorname{div}(f)) := \{p \in C : \operatorname{ord}_p(f) \neq 0\}
\end{align*}
is finite. Hence the formal sum
\begin{align*}
\operatorname{div}(f) = \sum_{p \in C} \operatorname{ord}_p(f) \cdot [p] = \sum_{p \in \operatorname{Supp}(\operatorname{div}(f))} \operatorname{ord}_p(f) \cdot [p]
\end{align*}
is a well-defined element of the divisor group $\operatorname{Div}(C)$ of $C$ (the free abelian group on the closed points of $C$).
[/step]
[step:Compute the degree using the sum-of-orders identity]
The degree homomorphism on the divisor group is
\begin{align*}
\deg : \operatorname{Div}(C) &\to \mathbb{Z} \\
\sum_p n_p \cdot [p] &\mapsto \sum_p n_p,
\end{align*}
where the sum on the right is finite by definition of a divisor. Applied to $\operatorname{div}(f)$:
\begin{align*}
\deg \operatorname{div}(f) = \sum_{p \in C} \operatorname{ord}_p(f).
\end{align*}
By [Sum of Orders Is Zero](/theorems/2176), the right-hand side is $0$. Therefore
\begin{align*}
\deg \operatorname{div}(f) = 0.
\end{align*}
[guided]
This proof is short because the work has all been done in [Sum of Orders Is Zero](/theorems/2176). The role of this theorem is to package the order-sum identity into the language of divisors, which is the language used in the rest of the theory of curves (Riemann–Roch, Picard groups, etc.).
\textbf{What is a divisor?} A divisor on $C$ is a finite formal $\mathbb{Z}$-linear combination $\sum_p n_p \cdot [p]$ of closed points $p \in C$ with integer coefficients $n_p$, almost all zero. The collection of divisors forms an abelian group $\operatorname{Div}(C)$, and the degree map is an additive homomorphism to $\mathbb{Z}$.
\textbf{What is the principal divisor of $f$?} For $f \in \mathcal{O}_C(\eta)^\times$, define the coefficients $n_p := \operatorname{ord}_p(f)$. The result is a divisor — i.e., a \emph{finite} formal sum — only because $\operatorname{ord}_p(f) = 0$ for all but finitely many $p$. This finiteness is part (2) of [Sum of Orders Is Zero](/theorems/2176): the set $\{p : \operatorname{ord}_p(f) \neq 0\}$ is finite.
\textbf{Why does the degree vanish?} The degree of $\operatorname{div}(f)$ is, by definition of the degree map, $\sum_p \operatorname{ord}_p(f)$. The same theorem provides exactly this identity: $\sum_{p \in C} \operatorname{ord}_p(f) = 0$.
\textbf{Strategic significance.} This identity is the foundation of the theory of divisor classes on a curve: principal divisors form a subgroup of the kernel of the degree map, so the divisor class group $\operatorname{Cl}(C) = \operatorname{Div}(C)/\operatorname{Princ}(C)$ surjects onto $\mathbb{Z}$ via degree, with kernel $\operatorname{Pic}^0(C)$. For $C = \mathbb{P}^1_k$ this kernel is trivial; for genus $g \geq 1$ it is a $g$-dimensional abelian variety (the Jacobian).
[/guided]
[/step]