The "priority" option tells which label will be displayed if two labels overlap but if you set the option to render all labels (even overlapping labels), the Z index option lets you choose which one will be on top and will be more likely to be readable.