Now I don't know about fighters, but I used to work on C-130s. Countermeasure systems (flare and chaff) rely on a weight on wheels microswitch completing a circuit when the aircraft is in the air, safety pins being removed from a panel to arm the system, an on switch, and a guarded switch being activated before the system can be used.
Now sometimes the weight on wheels switches need to be bypassed for testing a wide range of aircraft systems. Perhaps the aircraft was on jacks (tyre replacement?) or some sort of EMI occurred... But ultimately there really is a great deal of safety layers that had to be compromised for this to happen, including human factors.
Like with software development, you can't predict every possible action of your users (air or ground crew), and sooner or later you'll encounter an edge case nobody had considered.
Now sometimes the weight on wheels switches need to be bypassed for testing a wide range of aircraft systems. Perhaps the aircraft was on jacks (tyre replacement?) or some sort of EMI occurred... But ultimately there really is a great deal of safety layers that had to be compromised for this to happen, including human factors.
Like with software development, you can't predict every possible action of your users (air or ground crew), and sooner or later you'll encounter an edge case nobody had considered.