First off, it's never bothered me too much to fillet a cod & have to use the tip of the knife to remove worms. Unless the fillet just looks like a seething mass of spaghetti, then I just toss it.
But I got to wondering why cod get these parasites, yet halibut normally don't. At least, I've never run across a worm in the halibut I've filleted. Presumably, they both share the same forage and alot of the same habitat, so it's a bit puzzling to me.