'Colleague' just refers to someone you work with who is of the same rank as you, and probably on the same team. It's closer to 'teammate' or 'peer' than it is to "workmate you have a friendly relationship with". You can dislike a colleague, and you can also barely talk to or really know a colleague.
I think the point being made is that this is totally okay.
There's an undertone in this greater thread that "people you work with aren't really your friend" and it implies that these "not-really-friends" aren't pleasant to be around. But that's not necessarily the case. For many people, being around "colleagues" and making small chit-chat is enjoyable, desirable, and helpful, even if they aren't (and never become) your "friend".
I didn't say they are "merely pleasant". I said they are enjoyable, desirable, and helpful.
My point is, there isn't a right or wrong here. It's frustrating see the WFH warrior brigade come out and diminish other's experiences just because they had a bad experience. It's simply not universal.
Some of my best times were working in a university department. We did all this, though the talking to people outside your team was at proscribed coffee times in the staff lounge and sometimes over lunch.
But they remained colleagues not friends. Outside the few parties a year we didn't go round people's houses. We collaborated and fought over work, as that was what brought us together.
I make the distinction between colleagues and other employees as not all employees are colleagues. Colleagues help each other out of tight spots and talk beyond "Nice weather". Friends could be either, but in my experience once everyone is married and has kids, the closest will be "friendly" rather than "friends".