The $z$-axis doesn't have to be the vertical direction. It's just a convention people like to use to aid visualization. You can point the axes in whichever direction you want, as long as they obey the right-hand rule (which is also another convention). In practice, which way the axis points has no effect on the math. All your results will be the same.
As to why people prefer to have the $z$ axis pointed up (which seems to be what you're actually asking), I believe it comes from transitioning from 2D to 3D geometry. People are used to looking at the $xy$ plane on paper, so in adding another dimension it's intuitive to imagine "looking down" onto it, as if it's on the ground, and the third axis points towards the sky (in our direction).
You can, however, make the argument as to why it's not the case to have the $xy$ plane stay the same as before, with $y$ vertical, and $z$ points out of the page; maybe it's harder to depict, I don't know. Again, there's no objective answer to this. A convention is a convention.