The answer to 'why is my smoke detector sparking' is that a sparking smoke detector is often caused by a faulty electrical connection or component within the device. This can be due to age, damage, or a problem with the wiring. Sparking can also indicate that the smoke detector needs to be replaced.
If your smoke detector is sparking, it's important to address the issue right away, as a malfunctioning detector could be a fire hazard. For safety, it's best to call a licensed electrician to inspect and repair the smoke detector. They can diagnose the problem, replace any faulty parts, and ensure the detector is working properly.