This is one of my favorite phenomena in multivariable calculus. I remember noticing this when I was first learning the subject, and spent many hours wondering how this could be.
The explanation for this phenomenon lies in the following geometric principle:**
The boundary of a boundary is empty.
This geometric fact is in some sense "dual" to the fact that $\text{div}(\text{curl}\,\mathbf{F}) = 0$ for all $\mathbf{F}$.
In particular, if you have a volume $V$ that bounds a surface $S$, then the surface $S$ cannot have a boundary curve. Said another way, the boundary curve $C = \partial S$ is the empty set, so integrating anything over it is zero.
Example: In the comments, you consider a solid hemisphere $V$. The boundary of $V$ will then be the surface of the hemisphere and also the disc base. This closed surface (consisting of both the hemisphere surface and the disc base) does not have a boundary curve.
On the other hand, the surface which is just the hemisphere (without the base) does have a boundary curve: namely, the circle. However, this surface cannot be said to enclose any volume.
Note 1: Typically when one talks about a "closed" surface, one specifically means a surface which does not have a boundary curve. This is an unfortunate piece of terminology since the term "closed" can also refer to being a closed subset of $\mathbb{R}^3$, and these two definitions are not equivalent.
For instance, the hemisphere together with its boundary curve (but not including the disc base) is a closed as a subset of $\mathbb{R}^3$, but is generally not called a "closed surface." However, the hemisphere together with the disc base is a closed surface (and is also closed as a subset of $\mathbb{R}^3$).
** Note 2: This principle is somewhat vague as stated. In order to make it precise, one needs to rigorously define the notion of "boundary." This can be done in a couple of ways; some definitions will satisfy this principle, while others won't. For now, let's not get into these details.