The answer to 'why is my smoke detector sparking' is that a sparking smoke detector is typically a sign of an electrical issue. This could be caused by a wiring problem, a faulty detector, or other underlying electrical issues in your home. Sparking can be a fire hazard, so it's important to address the problem promptly.
Some common causes of a sparking smoke detector include loose or damaged wiring, a malfunctioning detector, or a problem with the electrical circuit that the detector is connected to. In some cases, the detector itself may be faulty and need to be replaced. It's important to investigate the issue further to determine the root cause.