Ground loop issues usually matter for input signals, but not for things
like stepper motors or spindles. Noise radiation from these cables
to other parts of the system can matter, especially for spindles
driven from a VFD.
Noise issues are funny, and there is no one right answer. If you are
not having issues with the stepper wiring causing false signals on
one of your inputs, and if you do have a safety ground to the metal
parts of the machine where the motors are mounted, the I would
tend to not connect the ground from the stepper motor cable.