I also have friends, but I rarely see them on workdays. Having other people around me on those days feels good, I don't like being alone for several days. I totally can do and have done that, but I prefer to not be alone.
Additionally, my colleagues and I share big parts of our life: every damn workday. None of my friends are capable of talking as long and nuanced about things happening at my workplace.
They don't really want to hear emotional rants about bullshit projects because they have no way to relate to those feelings.
But I want to rant about bullshit projects and thankfully, I have colleagues that like hearing such rants from time to time, as they totally can relate.
When I am mad about some shit, start talking about it and they ask "oh, was that XY who said that?" and it totally was XY, that is comforting.
I have friends, yes, and I don't need to meet my colleagues after work. But I still have healthy social relationships to them.