Why wrap wires around a magnetic donut on a wiring loom?
What you see is called a "common mode choke" and sometimes a "balun".

Currents flowing together in the same direction in all the wires (common mode), causes a magnetic field in the toroid.  This means common mode current sees inductance.  This inductance presents a high impedance at high frequencies, like what that would cause radio interference and get the FCC upset at you.

Currents flowing opposite in the wires (differential mode) cancel out and don't cause any net magnetic field, and therefore they don't see any inductance.  These are the current the wire is intended to carry.  The power line current goes into the unit on one wire, and a equal and opposite current comes out another wire.  These legitimate power currents are unimpeded by the common mode choke.

Motors with brushes can cause lots of nasty voltage spikes as the brushes make contact intermittenly, which they always do to some extent.  Of course the commutation is a deliberate on/off switching of windings in the motor, which cause even more voltage spikes and sparks.  All these spikes contain high frequency components that would be illegal to radiate from the power cord or conduct back onto the power line.  Since the power cord can only act as a antenna for common mode signals, a common mode choke is a typical solution for attenutating these unwanted signals.

Common mode chokes are quite common.  Often you will see a small lump in a power cord near where it leaves some device.  That is a ferrite donut around the wires.  In that case there is only 1/2 turn "around" the toroid, but in those cases that is good enough.  A brushed DC motor produces lots more nasty signals than most typical consumer electronic gear, so the common mode choke had to be more aggressive.  In this case, they wound the power wires around the toroid several times.  The choke impedance goes up with the number of turns.