Both the primary and secondary ignition circuits rely on working against ground. Here is a circuit diagram for a standard Kettering ignition system:
In the case of a magneto such as yours, the magnet in the flywheel passing the coil in the module generates the voltage shown as 12 V in the diagram. In an electronic magneto, instead of having the breaker points shown, a simple transistor circuit acts as a switch, opening the primary circuit when the magnet passes the module. So, a fairly low voltage appears across the left or primary side of the coil, and then the bottom of the primary is suddenly disconnected from ground by the transistor circuit. The sudden collapse of the current flowing in the primary causes a magnetic pulse in the laminated steel core or yoke of the module (the part that has to be close to the flywheel magnet) and that magnetic pulse causes a momentary very high voltage to appear in the secondary winding of the coil (the right side). That voltage will be around 15,000 volts. Because the bottom of the secondary is grounded, and so is the steel body of the spark plug, current flows through the high tension lead to the spark plug, jumps the spark plug gap, and returns to the coil through its ground connection. So, neither the primary nor the secondary circuit can work without a secure ground connection.