The random black wire is a ground wire. "normally"
black is ground, and that one is defiantly going to the frame/ground.
The way I think about it, you can make an "event" ( ie: light come on ) when the circuit is competed 2 ways. Either you add the juice or you can connect the ground. Either way it will complete the circuit and make whatever get power.
I'm using the wrong terminology probably
and probably only confused you. Sorry
I just maxed out my electrical knowledge