Sometimes having 6 degrees of freedom can be a little... too much freedom. Locking your translation axes can help mitigate some of the difficulty involved in capturing the perfect moment or keeping your desired framing.
Just as a cinematographer in real life will make the decision to place the camera on a rig rail/dolly and limit the axis of movement to one axis, we can decide to replicate that same effect by only allowing our camera to move along the X or Y axis in the virtual world. And forget the hours of setting up a real rail and attaching your camera; our solution is as simple as a click of a button.
Locking the X axis blocks any forward/backward movement and only accepts input from the Y (and Z) axis.
Locking the Y axis blocks any lateral movement (sideways) and only accepts input from the X (and Z) axis.
Locking the Z axis blocks any vertical movement and only accepts translation input from the left stick (forward/backward, up/down).
Can either be used to your advantage to simplify a motion that is difficult to track or as a creative decision to replicate the look and feel of a traditional Hollywood shot.