Actually, ZBrush maintains a 32 bit depth map of the scene. Notice that we don’t call them “pixels,” but rather “pixols.”
Here’s the difference in what each “remembers”:
Pixels (used by 2D apps):
:b4: X position
:b4: Y position
:b4: RGB value
Pixols (used by ZBrush):
:b2: X position
:b2: Y position
:b2: Z position
:b2: RGB value
:b2: material
You can really see the fact that ZBrush tracks the full depth info of the object (including pixols that face away from the camera) in the example below.

I’ve activated ZMode in the Light>Modifiers>Shadow menu so that ZBrush would take that depth information fully into account. Notice that the shadow is properly shaped for it to actually be cast by a sphere when the light is coming from that angle? If the depth information for backward-facing pixols was lost when the object was snapshot, then you would see a curved front edge to the shadow and a straight line for the back edge.
Of course, telling ZBrush to make full use of that information does slow things down a bit. Which is why full shadows are only calculated during a best render. But the bottom line is that the full depth of the object does indeed remain!