After almost 19 years of marriage my ex started an affair with someone he met on the internet. I found out, and should have chucked him out, but as she lived hundreds of miles away, I agreed to let him stay in the spare room. I was scared of coping on my own and wanted us to get the house in a better state so we'd get a better price so we could move on more easily. I now know that was damaging for my DD who found it very stressful, especially as she was angry with her dad about the affair, and he made little effort to rebuild the relationship. However DS did a lot with his dad and I think it may have been beneficial for him, though we haven't really talked about how it affected him. Initially he said he would want to live with his dad if he moved out, but in the end he stayed with me.
My ex eventually moved out as the girlfriend moved nearer but it took a while before we got divorced as he didn't co-operate, thinking he'd do better financially if the children had left home. By the time we divorced both children were at university. I only did OK financially as he was made redundant and got a new job by emigrating, so I kept the house!
Both my children have a relationship with their dad but my DD wished I'd kicked him out when we first split, even though we didn't row too much. She just said it was too weird. Although DS did lots with his dad, he came to me for advice and says his dad was a rubbish dad! He's married now and a dad himself so hopefully he's learnt useful lessons.
I hadn't been happy for a long time before my ex's affair but I stayed with him because I believed in the vows I'd made and was trying to make things work. I thought letting him stay after the split was for the best for us all, but now I'm not so sure. It worked OK for me in the end, but not best for my DD.
I have a friend who's parents stayed together until she and her brother left home. She said it was bad for them all.