While this is true, it's worth mentioning that a regular coffee machine small talk in the office is not building any relationships. At least that's how I experience it. It can start one, but won't automatically make one.
I can go for a coffee and routinely get dragged into 30 min conversation about politics, or cars, or weather, or any other subject I literally don't care about. All the good relationships begin with finding a niche topic between 2 people.
YMMV I guess. I've got tons of friends I've made walking around the office and just dropping in and asking people what they're working on and introducing myself, or sitting at a table with people I didn't. Some are no more than acquaintances, but some are close friends now.
Do you put any effort in steering the discussion towards something you care about?
A discussion that started about the newest model of some car, ended up with that person fixing my boat's outboard motor.