The prior owner may have done this due to bad grounds between the cab and engine. That wire can be a ground loop: a bad thing. Cut it short from the regulator and ground it to the firewall or take it off completely. The best way to add grounds is a battery cable sized strap from the engine to the frame and engine to body.
If you run the frame and body straps to the negative terminal of the battery (never do this) consider what happens if the battery to engine cable fails or gets high resistance: hit the 10HP starter asking 800+ CCA. The current isn't going through the failed battery to engine cable so it goes through the body and frame straps from the battery, but, it still has to get to the starter on the engine so it arc welds bearings, burns up small ground wires, or catches them on fire on the way from the body/frame to the engine. If you properly ground engine to body and engine to frame the negative battery cable failing stops everything.
One other thing: ground things away from the electrically noisy alternator. Also don't double duty existing ground locations with the ground straps. Put the grounds elsewhere on their own bolt. If you don't the ground wires become antennas and the radio can pickup noise that is normally dissipated into the larger ground body. ECM's are also affected by putting other grounds on theirs.