Why negate z when constructing projection matrix OpenGL
I'm assuming your scene is constructed based on right-handed coordinates.
If you are using OpenGL, yes. If you are using Direct3D, no.
The projection matrix maps [-n, -f] into [0, 1]. This weird property comes from the fact that the eye coordinates are right-handed, but the clip space (NDC) uses left-handed coordinates. Hence the implementation of ortho().
Direct3D uses a z-axis that goes outwards the screen. Implementations for Direct3D projection matrices will not produce negated z when coupled with your application.