I did have two acquaintances from long ago when I was a humanities major at school who did this. They were roommates in college, both worked for the same lab, then worked at the same tech company after college.
They later moved to California, continued living together and working on the same teams at work. Eventually, they got separate houses but still work together as a high functioning mini-team in their own shared office at a huge SV company last I heard. It probably raised eyebrows at interviews saying they wanted to work together, but they excelled technically and in the long run it seems to have been a significant career advantage that raised their productivity and possibly even rate of learning.
The impression I get is that the situation is something almost no manager would ask for or have any desire to disrupt.