Yeah I think you are confusing local and global orientations.
When you add a new object in Blender, the local and global z axis are both the same, straight up and down 👍
If you then rotate the object 90d on the x axis, in object mode, the global z axis is still, and will always be straight up and down,
However the local z axis is now aligned with the global y axis.
Think of it like this…
You are standing in a field outside, top of your head pointing towards the sky…
Now lay on the grass…
The top of your head is still the top of your head, but it’s not pointing towards the sky,
the sky is always up (global z), the top of your head is always the top of your head (local z)
It will always be this way unless you apply the rotation, which will make your nose point in the local z matching the global z
Of course, if you rotate in edit mode the local axis doesn’t change, because you are rotating the mesh not the object.