EMI RFI Filters are required in two situations, to prevent EMI from an Electronic Equipment Like A Dimmer, Thyristor Drive, SMPS or Switcher affecting other Modules in a System or Neighboring Equipment. The Second Situation is when a Sensitive Equipment Like a Medical Apparatus or Precision Measuring Instrument has to be Immune to any Noise from outside, as it can affect performance.
Sometimes it is Accuracy that can get affected, but some electrical jolts can damage or desensitize fine sensors or positioning systems.
On the right you can see a Filter that i used to make long ago, This is connected in series with an Existing Mains Chord. It can also be Fixed in a Control Panel with a Clamp. One Y cap is Missing in this Piece. The Big one must be the X cap a higher Capacitance Value. The Y cap is Lower Value and withstands around 1kV, It is better if X cap is AC 440V.