Let's consider the ways in which you can situate and face the axis of the transform gizmo. Think of a tree growing on a flat ground, among a row of trees. One tree is out of line from the rest, growing at a 45 degree angle. For all the trees, if you scale them up in the View space (aligned with the ground), they will grow straight up. If you scale them up in Local space (aligned with their own axis), the 45 degree tree will shoot upwards at a different angle to the rest.
Sometimes the facing direction of a mesh and its pivot don't agree. Here's how to adjust the pivot to face a given direction based on its local space, or view space, or to use the facing direction of another object in the scene.
Changing View, Local, and Working Pivot space only changes the orientation of the transform gizmo accordingly.
In order to change the option that is active, go to the main toolbar, where there's a rollout with the Reference Coordinate...