They can go to Grandma, or to some other relative. Or some friends can work something out where they watch each other's kids. Or the mom can put the kids up for adoption.
This is one of the reasons I encourage my girls to date guys from intact families so that there is the expectation from both sides that marriage is a bond that we don't walk away from when things get hard.
As the father of three daughters, The oldest in college, I whole-heartedly agree with you.
My younger dated a boy this fall from a broken home. Ugly divorce, one of the worst I'd ever heard of. Both parents playing the kids against the other parent, cheating, etc. I gritted my teeth and said nothing, but they didn't last long. He was so insecure that she would dump him for someone else, that eventually, she dumped him. She know understands that he didn't know what a secure relationship looked like and altough she did like him, he wore her down.