You connect the shield at both ends when you _want_ current to flow on the shield. For example, if you have 'common mode' current flowing on the contained wires, and you want to protect other things from those currents, then you connect the shield at both ends so that 'balance' current returns on the shield.
The specific example of a motor on a VFD is something that I am dealing with right now. The VFD 'switches' the output terminals between the + and - DC rails at a couple of kHz. The motor windings 'see' the voltage difference between the terminals, this is the desired voltage that runs the motor. But at the same time the entire motor winding is jumping around at say 700V peak to peak and 4 kHz relative to the grounded motor frame. This can inject amps of current into grounded metal via capacitive coupling. You want this 'common mode' current to return along the same path as the VFD drive cables back to the VFD.
-Jon