The boundaries in your example aren't of the correct dimensionality. Actually, the geometry of what you've chosen would be convenient for Stokes' theorem, but that involves curls and line integrals instead.
Here is a similar but more accurate analogy. Imagine a free cylindrical pipe you can hold in your hand. The pipe has two open ends, and water is gushing out of both ends. (How is this possible? I don't know: apparently water is being created out of nothing. But let's ignore this impossibility, since it will be convenient.)
Now you want to add up all the infinitesimal amounts of divergences $\iiint \vec{\nabla}\cdot\vec{C}\,dV$ for your water flow vector field $\vec{C}$. The straightforward way to do this is to actually perform the volume integral. I'm imagining some sort of Dirac-delta sources as contributing to this volume integral, but as long as you imagine water appearing out of nowhere, this volume integral will be non-zero since "sources" of such fields have positive divergences.
Now you want to use the divergence theorem instead. This states that, instead of evaluating the volume integral above, you evaluate the flux through closed surface integral $$\iint_\text{closed} \vec{C}\cdot d\vec{A}.$$ This should make intuitive sense, since the water that comes out of the magical "source" inside the pipe must flow out.
The area you're integrating over is the imaginary closed area that surrounds the entire pipe. So it takes the shape of the closed cylinder, which has a cylindrical tube and two circular end caps.
Almost there. The surface integral around the curved portion would be zero since there is no flow here; no water's coming out. The only contribution would come from the the integral over the (imaginary) circular end caps.
That's it. Now contrast this with your own analogy. You were using the edges of the circular end caps as being relevant for the RHS of the divergence theorem. Instead, it's the entire imaginary end caps that play the important role. The cylindrical surface is also important, but that contribution happened to be zero.