Based on a quick look, I believe it has to do with serializing compiled code, including quoted values embedded in compiled code. Serializing compiled code uses the same entry point as the other printing functions. For example, try this:
(write (compile '(quote (1 2 3))))
and compare the output against the contents of some .zo file.
You probably don't want to make any changes that affect the behavior when compact is true, unless you're trying to add support for a new quotable and readable data type. In that case, ask Matthew for help :)
Ryan