Features are ordered by the so-called z-order value which is computed from road class, OSM layer=* , bridge=* and tunnel=* tags.
At low zooms (e.g. z5) the layer=* tag stops being important and we want to order by only kind. This allows greater line merging for fewer features as well as additional simplification.
At low zooms (e.g. z5) the layer=* tag stops being important and we want to order by only kind. This allows greater line merging for fewer features as well as additional simplification.