$$

x[n] = \frac{1}{2\pi i}\oint_\Gamma z^{n-1} X(z) dz,

$$

where $\Gamma$ is any counterclockwise closed path containing the origin and entirely in the ROC.

Compare this formula to the formula that allows to extract a probability mass function $x[n]$ from a probability generating function $X(z)$:

$$

x[n] = \frac{X^{(n)}(0)}{n!}.

$$

I'm confused: Assuming $x[n]$ is a probability mass function, why would someone ever want to evaluate a contour integral instead of doing basic differentiation?