Imagine you have a annular region $1<\vert z\vert<3$ and take a function $f\left(z\right)=\frac{1}{z}$ and a contour $\vert z\vert=2$. Then the integral of this function over this contour is equal $2\pi i$ times residuum at 0 and this is certainly not zero. We just used Cauchy residuum theorem.