Why does Green's Theorem require partial derivatives to be continuous

Continuity of the partial derivatives is strong sufficient condition.

Consider the simplest proof of Green's theorem for a rectangular region $D = [a,b] \times [c,d]$. One step is to show that (with $P_y := \frac{\partial P}{\partial y}$)

$$\tag{*}\oint_C P(x,y) \, dx = -\int_D P_y(x,y) \, dA,$$

which reduces to

$$\int_a^b P(x,c) \, dx - \int_a^b P(x,d) \, dx = -\int_a^b \int_c^d P_y(x,y) \, dx \, dy = -\int_a^b \left(\int_c^d P_y(x,y) \, dy\right) \, dx$$

We have to be sure that we can evaluate the double integral as an iterated single integral in any order and we have to apply the fundamental theorem of calculus to obtain

$$\int_c^d P_y(x,y) \, dy = P(x,d) - P(x,c),$$

in showing that (*) is true.

All of these steps can be justified if the partial derivatives are continuous.

However, there is a more general form of Green's theorem for Lebesgue integrals which requires only that $P$ and $Q$ be absolutely continuous. In this case, the partial derivatives exist almost everywhere, are integrable, and the fundamental theorem still holds even though the derivatives need not be continuous everywhere.

For example, observe that Green's theorem still holds for $D = [0,1] \times [0,1]$ and

$$P(x,y) = 0 \\ Q(x,y) = \begin{cases}yx^2\sin(1/x), \, \, x \neq 0 \\ 0, \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, x = 0 \end{cases}$$

even though $\frac{\partial Q}{\partial x}$ is not continuous on $\{(x,y): x = 0, 0 < y \leqslant 1 \}$.