Why do married couples stay together if they are completely unhappy with each other?

I am friends with a married woman that her and her husband no longer share a bed together and they sleep in different rooms. She confides in me and asks for advice a lot and I tell her straight out that she needs to file a divorce and go their separate ways , but she doesn’t do so for whatever reason. Would you stay in a marriage where your partner no longer wants to share a bed with you?
Why do married couples stay together if they are completely unhappy with each other?
Post Opinion