Yes, and the point is that if you or your coworker is laid off or take a new job, that proximity is immediately nullified and the relationship typically withers and dies.
Spend less time socializing at work, and more time creating that prolonged proximity outside of work, so that relationships of your choosing can be formed that are less subject to the whims of your bosses and the economy.