Yeah, it totally can. You see it a lot with teams that have to solve tough problems together. That shared stress turns into inside jokes and then people start a group text about random stuff. Next thing you know, a few folks are grabbing beers on a Friday or watching the game together. The work bond becomes a real one without anyone forcing it, lol.
Our team group chat is basically just memes about the printer jamming. It's a sad state of affairs, but I did get invited to a barbecue once. Does that count?