That connector went to original taillight. It contains ground, brake and tail light signals (can be used for license-plate light).
I suppose when they installed integrated taillight/brake/turn-signals it came with bullet connectors and didn't plug in directly. So they vampire-tapped into wires. Damn hacks!
Mating 3-way male-connector might be one of these (will have to find dimensions from somewhere to compare). Although it looks like older unsealed Molex connector. But most likely Hitachi-style Sumitomo:
http://easternbeaver.com/Main/Elec__...onnectors.html
https://www.corsa-technic.com/item.p...ategory_id=126
http://www.cycleterminal.com/110-connectors.html
https://www.automotiveconnectors.com...terminals.html
Turn-signal lights can use these connectors to plug into factory harness:
https://www.corsa-technic.com/item.p...category_id=91
http://easternbeaver.com/Main/Elec__...onnectors.html
EDIT: found
Sumitomo MTW connector dimensions here.