I've got a handful of close friends that I used to work with. Including a couple of former managers. But that friendship and trust didn't really start until after we parted ways.
It works the other way too. I recruited one of those friends for my team at my last job. I've known this guy seems like forever. I was at his wedding 12 years ago and took care of his dog during his honeymoon. Threw his divorce party. Started a business with him. Let him stay with me when he was feeling down about the divorce. Celebrated his new wedding with him and play with their daughter while we watch football and eat pizza. We've loaned each other cash when we were having rough times.
But when he walked in the door on my team a few months ago, nothing needed to be said. Total professionalism. Just people trying to solve problems. We hang out and be friends on our own time. And work is just work.
But the risk is still there in non-tenured situations. There was a situation at the company we started together when things were not going super well. And he had to let me go. I wouldn't want to do that anymore than he did at the time, but if I had to for <reasons> it's a thing that could be done without destroying the friendship.
I'm also hoping to go back to a company I used to work for with a manager I really liked. We've stayed friends since I worked there before, and I'm excited to go back for a number of reasons. But the bottom line is that once I sign that piece of paper that says "at will employee", I have to treat it the same as any other job that has no guarantees. And I can't rely on any past friendship with that person.
Work is work. In a culture that awards tenure only to a certain select group of people, work is always--as you put it--transactional. Trust really doesn't enter the equation.