Mechanical commuation by the commutator causes spikes similar to electronic switching. At least for small DC-motors it is common to add some small capacitors to avoid RFI.
Pete... A universal (drill, vacuum)motor needs no cap for starting. You could put a cap across the line with the motor for the spikes as Electricuwe points out.
As a kid, it was virtually impossible to find a mil-surplus DC motor that did not have a <1ìfd "bathtub" capacitor strapped across its power terminals.