I am not sure but that looks like a Posilock connector which would not be a stock connector.
The prior owner probably had something wired into that is my guess. You can use a volt meter and see if it has power to it with the key in the off position and then check it with the key in the on position. if it does then I probably would wrap some electrical tape or heat shrink the end to prevent it from shorting out against a ground.
While you have your voltmeter out check you battery voltage. It should be around 12 or 12.5 volts. If it is not then charge the battery and see what happens. If you charged it and it is still low then it may be time for a new battery.
Also, do you know if the stator recall was done on the bike (the stator is what provides power to charge the battery)? If not, call your local Yamaha dealer and give them the VIN#. They can tell you if it has been done and if not get the bike to them and have them replace the stator - there should be no charge to you for that work.