Because the :pretty is used only when the underlying driver supports it. We know that JSON supports the pretty_generate and this is not performance critical code: we convert to json just because the pretty output.