The sprites have alpha transparency, so they need to be rendered back-to-front in order to get alpha blending. Imagine you draw a transparent portion of a sprite with the depth buffer, then you draw another sprite behind it. The sprite in back should be visible, but it won't be drawn because it fails the depth test. This page has some good visual examples of what that looks like:
https://learnopengl.com/Advanced-OpenGL/Blending