Why does Blender have the Z-axis up but is the depth-pass actually called a Z-pass?
Because 3D space and image space are unrelated.


It makes sense that you have (X, Y) used for a 2D image, so then its logical that the depth be Z.
Which axis represents 'depth' in 3D space is undefined, there is no right answer and it's not consistent between applications, if you work with maps it may make sense that (X, Y) are for a 2D top-down view and Z is the land height. But you can rationalize this differently too, so what makes sense to you is probably based on the applications or use-cases you've previously been used to.