Well, you can randomly hatch a shiny, just as you can encounter one in the wild. I'm guessing that, by the same principle as that, it's entirely possible to hatch a baby with Pokerus, even if none of the parents or a party member has it and is actively able to pass it.