The color and the connector suggests a safety switch. I'm guessing since it just the one wire, it goes to the blade engagement in reverse safety switch. Should be located below or near the shifter. It grounds the magneto if you shift into reverse with the blade engaged. Owners often remove these so they can mow in reverse without disengaging the blades. This is usually not even a switch, just a spring steel contact that the steel shift arm contacts to ground the system.