It's not necessary, you can disable it.
It is used for compression of web content (on the fly) when serving static pages. It's also used in the file bundling builds where the bundled resources may in fact be compressed in the bundle and some will need decompressing before they can be used. But if you disable zlib the bundle will simply not be compressed.
Adam