Isn't this also how a lot of friendships start? People finding themselves in a similar place/situation/habit/interests. So to me it seems a bit natural that workplace friendships would naturally develop. It's healthier to make an effort to have friendships outside of work as well, of course.
Maybe I'm being naïve, but I don't see how "toxic atmosphere and disruption of team dynamics" would result from these casual friendships. If anything, I'm more likely to hold myself accountable to my team members when I know them better personally.