I’ve asked myself this same question, and coming from a military background rather than anything more typical, I think it coalesces as something altogether different depending on the situation.
When I was stuck on a ship with hundreds of others, underway two or three weeks out of every month, 6 to 8 month deployments sprinkled in just for fun… Hard not to come out of a situation like that with some lifelong friendships.
On the other hand, in the years when I wasn’t on a ship, almost regardless of the work, even if we were friendly during the day, when the time came to go home it was like cockroaches when the lights come on.
I’ve come to the conclusion all these years later that it was some combination of shared hardship, forced closeness, security in employment, and a core belief that we were all working toward the same goal. We were in it together, and it felt like it.
Social relationships come from everywhere, even work, and while there are many people who worry that friendships at work will distract from… I don’t know… There are still plenty of people out there who want to make the day go by a little faster by working with a friend.
Maybe it just comes down to people not being committed to their work, because why would you be? Sticking your neck out, working extra, helping others, etc. are punished in a lot of different little ways, to the point that the best alternative is just to hop between jobs, staying one step ahead of accidentally giving a fuck.