Alright, it's about time I did this, I'm just gonna write out all the major events that led to how 7 is today, so it's gonna be a long ride.
First, they were originally a member of the octarian army, working their way up to a commander rank. But after a while, it didn't feel right to work for the octos anymore, when they realized all the terrible things they did.
Desperate for a job that's not in the army, 7 stumbled upon the entrance to the metro. There, they met Commander Tartar, and Tartar offered them a job working at Kamabo as an employee. At the time, they had no idea what Kamabo's true plans were, so they agreed. Eventually, 7 had gained Tartar's favor and became their second-in-command.
A few months pass, and 7 found out about Tartar's plans from one of the other metro employees. They attempted to shut down the entire facility and stop them, but it didn't work. Tartar found out about their act of defiance and ordered for them to be marked as test subject number 10,007, experimented on, and later sanitized, but the sanitization didn't work. 7 has a special gene in their DNA that makes them immune to any kind of mind control, so the sanitization only changed their physical appearance.
After this happened, Tartar ordered for them to be put in the blender, but before they got the chance to, 7 escaped from her holding cell through the ventilation system.
They came to the surface lost and confused, but the Squidbeak Splatoon found them and took them in as Agent 7 shortly after Agent 8 escaped the metro. (In my canon Tartar didn't die from the explosion at the end of octo expansion)