When is it appropriate for married people who hate each other to stay together for the children? That's a call each couple has to make on its own, but there are some considerations that should be taken into account.
The children will adapt to just about any structure that the divorcing parents set up, and there is no basis in fact for assertions that the usual range of changes will damage and traumatize them. Abandonment by a parent will be hurtful and ought to be avoided, but otherwise the new arrangements will have no deleterious impact on the kids. Most assertions about maintaining a status quo are really thinly disguised rationalizations for keeping the adults in their comfort zones.
The primary issue that most coupes will face is that moving from one to two households will have a huge financial impact. They may not be able to afford to split up and will need to stick it out until they have rearranged their lives in a way that makes it possible to split without too much of a fall in their standards of living. For example, waiting until all the kids are in school full days might be necessary. That will reduce child care costs for the custodial parent and permit her to keep a better job. If the kids are nearing the age of majority, the parents may as well stick it out until the kids grow up. They are going to need all their money for educational expenses.
Couples should keep in mind that they had kids for their own amusement and that arrangements after divorce should allow for both parents to get their money's worth of entertainment value from their offspring. Don't turn the kids into a burden. Noncustodial fathers often find that their relationships with their children become way more fun after divorce because they don't have to deal with the kids every day. They often start to spend quality time with their children for the first time after divorce when the mother isn't around to interfere with bonding and good times.
Custodial mothers often find that their children are much less entertaining once they have taken on even more of the burdens of parenting with no increase in benefits, but it is difficult to reason with divorcing mothers and to get them to understand that restricting the father's access to the children is akin to throwing Brer Rabbit into the briar patch. If he is demanding more access, he doesn't mean it and is usually trying to get concessions in some other area, as in finances. He doesn't want to spend any more time with the kids than he has to. Think, woman, at how little interaction he had with them when you were living together! It was like pulling teeth to get him to do anything with the kids or to help with their care. Now he wants to be Super Dad? Try and get him to take the kids at least half the time. Hell, threaten to give him full custody and take occasional visitation yourself. Call his bluff. Worst case scenario? You're free!
Anyway, don't stay with the harpy or asshole as the case may be because someone told you that having both of you in the same household matters to the kids. It doesn't. If you can afford it, split up. It's worth it, and you won't hate your kids for forcing you to stay with someone you can no longer abide.
Finally, consider that staying together for the kids is often a vehicle for the spouse who does not want the divorce to hang onto the hope of reconciliation or to hang onto circumstances that he is comfortable with. He's not going to change, not for long anyway. And he's going to spend the time whining and begging and guilting and undermining you. You think you're in hell now? This won't be doing the kids any good, either. It won't do them any harm, but it won't be helping them, and you'll be going through all that crap for no good reason.
In conclusion, the only good reason to stay together for the kids is if you can't afford to split up.