I have this in local mode
I found the answer It consists of 7 steps Orient local axis to match mesh's shape How can I do it faster?
How have you rotated the cube?
Local transform orientations do follow the object's transforms.
But If you've rotated the cube in edit mode instead of object mode, then you have rotated only the mesh inside the object. Not the object itself, which rotations haven't changed.