The correct answer is D. Sparking at the brushes in a DC machine is primarily caused by the effects of armature reaction. Armature reaction refers to the magnetic field produced by the armature current, which interacts with the main magnetic field of the machine and causes distortion. This distortion can lead to uneven distribution of the current flow at the brushes, resulting in sparking.