My little spy family! I am not lying when I say the ISA part of Person of Interest was my jam! I love the Activity! And because of that love, I share Shaw's slight (not so slight?) bias against the CIA.
In my opinion, the best operators from the CIA were Kara and John and that's it. I wasn't impressed at the CIA folk in season 5.
Meanwhile, I love everyone from the Activity and squee'd whenever they appeared! Samaritan shutting down the Activity saddened me and in retaliation in all my post-season 5 headcanons Shaw always rescues Control from a Samaritan controlled black site and helps her get the Activity up and running again.
This brings me back to Hersh.
I believe that not only did Hersh train Shaw, but he recruited her too. I really love how, even when he was killing her, you can tell Hersh was very fond of Shaw, and Hersh being genuinely concerned about Shaw's new employment situation was sweet.
My headcanon is they were both products of the Navy but Shaw moved to the Marines after she was booted off the Navy's medical program so they have an instant bond.
I bet Hersh always looked to the Navy first when he had to set up the Northern Lights/Catalyst unit even if the Activity was originally an Army Intelligence unit but it was seeing Shaw in action that made Hersh stop and consider the young Marine Captain.
I bet this shared Navy history is why Shaw derogatorily calls Hersh 'George'. (In Navy Slang for Junior Officer Requiring Guidance (JORG) - "George jobs: Nit-picking paperwork jobs given to George because no one else wants them." HT to kindaoffkilter).
As for Michael Cole, I think Shaw and Cole were contemporaries, they both joined the program at the same time but their beginning couldn't be more different. Cole volunteered because he was an idealist but where Shaw shone Cole was in danger of washing out but Shaw was able to help him.
Initially, I think Cole was wary of Shaw but just like what happened with Fusco and his son something similar happened that cemented Cole's trust for Shaw completely.
Cole was one of the few people allowed to call Shaw 'Sam'. There are levels of intimacies to Shaw's name. Shaw is what she goes by for everyone she has to introduce herself to, 'Sameen' is complicated because it can be a name she introduces to people under her non-official covers and people who do know her but only a few can get away with calling her 'Sam'.
Wilson called her 'Sam' in Relevance and Wilson used it to both bait and taunt Shaw. He knew that was what Cole called Shaw, it's also presumptuous because Wilson thought because he was her handler he can call Shaw 'Sam'. He was wrong.
Root as Veronica Sinclair called Shaw 'Sam' because it was the fastest way to establish trust. Root was on the clock and she knew it was only a matter of time before the Activity would appear. Much later Root calls Shaw 'Sam' after their field trip to Alaska and Miami implying they've grown closer and from then on Root is the only one to call Shaw 'Sam'. It's not often but it's notable.
TLDR: Cole really was the only person Shaw considered friend.
For Cole, his feelings for Shaw was more complicated, I think Cole's 'Only yours' was more than a declaration of romantic love. Their bond was fire forged.
I think once Cole grew to understand Shaw it was hard for Cole not to love Shaw but he knew Shaw won't return his feelings. He understood and accepted it and beyond those romantic feelings he genuinely cared about and respected Shaw.
There was a real bond between them and it was a different flavor from Kara and John, and Grice and Brooks' partnerships.
Alicia Corwin and Mark Snow's ruse on Kara and John would never have worked on Shaw and Cole.
Hersh, Special Counsel, and Wilson all knew this. It was why the kill order was for both Shaw and Cole.
Hersh was always secretly proud to hear about Team Indigo Five's successful missions.
Back in their day Shaw and Cole were the team. After the kill order on Shaw and Cole was approved Hersh had a brief but sharp feeling of regret; there would never be as effective a team as Shaw and Cole in the Activity again. Crimson Six Team would be close but that's through Shaw's training of Devon Grice.
In the end, I think Hersh was satisfied to see Indigo Five Alpha landed on her feet (she always lands on her feet) and that her new partner was an adequate back-up for the daughter he never had.