Since the Pauli Z gate equate to a rotation around z axes of the Bloch sphere by $\pi$ radians, the phase of anything that lies on z axes is expected to change by $\pi$ by applying z-gate. As $|0⟩$ and $|1⟩$ lies on z-axis so their phase should change by $\pi$. So, why doesn't z-gate change the phase of $|0⟩$?
Mathematically it can be understood but as per definition of rotation representation of z-gate matrix doesn't seem to be correct as it only changes the phase of $|1⟩$ and not $|0⟩$. Why is it like this?