1. sometimes only one partner could afford the house on their own. It
makes sense for them to be the one that stays.
2. if there are children, then where possible it can make life easier on
them if the parent who gets custody stays in the house
so the children don't have to move. This is more frequently the mother.
3. if the divorce is seen as one person's "fault" then they are expected
to take on most of the inconvenience, which includes moving out.
4. depending on your state and any pre-nuptial agreements and niche
circumstances like living in a house owned by the parents of one person,
sometimes the house straight up belongs to one member of the couple and
they get to stay there.