In some cases, it's pretty simple. The child will still have two parents if one parent gets primary custody, but not if the other parent does. That factor does not outweigh some even more horrible things that sometimes happen to children, but it outweighs most other factors such as which parent and which home does some parenting tasks better, or is what the child is already used-to.
The Australian judge and lawyers in the story below described such a move as "drastic". But it's not that drastic, in my experience in the U.S. Changing custody requires first, a relevant, material change of circumstances, and then a wide-open evaluation of what's in the child's best interests under current conditions. That should include: what example do the parents set for the children about how to treat other people and what to prioritize? Should the children learn that alienating, vicious, deceptive borderline-personality behavior works to meet one's goals? Is it healthy for a parent to lie to kids about the other parent to manipulate their emotions? And most important of all, is it better to grow up with two parents, or one manipulative, shortsighted, selfish, immature parent?
One big caveat: When there are abuse accusations, the time to diagnose and counteract parental alienation is AFTER investigating and resolving the abuse issue. And alienation, likewise, should be proven before it's punished. Fortunately, in most cases it's obvious and the alienating parent doesn't try hard to hide it, and may even proclaim it.