They can get distracted and this may also have a bad effect on the flow of work. This is why they may not prefer workers to interact with their family members. However, this also depends on the designation. Bosses usually have more power and they may meet their family members at work.
Exactly! The moment you're not thinking straight at work because your focus and attention have been diverted to your family and friends that came visiting you at work, it's certain that your work output is going to drop until your visitors are gone. There's no way you can serve two masters at once.