My parents separated when I was an adult so it's a different experience, but I had parents who stayed together 'for the children' from when I was a small child and it made things really difficult.
My parents were quite young when they had me and my brothers, and from what people around me have said I think they didn't ever really have a real relationship. They didn't have a lot of money and knew it would be harder work in many ways raising us separately. I don't remember them ever arguing with each other, they were just very detached and wouldn't really do anything together that wasn't completely structured around us. Like they would come to our school plays together but had no friends in common and never watched films or went to the pub together or anything like that.
But by the time I was a teenager and had my own hobbies, rather than things being structured around taking the kids to swimming lessons or the cinema or whatever the entire social side of our family broke down. By that point me and my brothers had our own rooms, and my dad had moved onto the sofa downstairs permanently. They were amiable and would talk about bills etc. but were just very disconnected, and it felt like the entire (small) house was separated into rooms my mum went in vs rooms my dad went in. My dad stopped using the kitchen fridge and cupboard and essentially lived off microwave meals. I felt like I couldn't have friends over because anywhere I went it was like I was trespassing, and people would ask about the weird dynamic and why there were clothes in the living room, and why there was very obviously a grown man living on a small sofa without a duvet or pillow or anything. My mum is very sociable and outgoing, but never had people round either. There was this unspoken rule that we couldn't acknowledge any of it out loud, and it meant we were under massive pressure trying to lie and cover all the weirdness of it up when we saw friends or extended family, and me and my brothers didn't even feel like we could talk about it to each other. We'd have really convuluted conversations trying to avoid saying 'mum's room' or 'dad's room'.
It used to really bother me and I absolutely wished they'd just split up from the age of about 8. Then when I was getting to the end of secondary school I think there was this tension among all of us because we all knew we were slowly losing the reason we were all together as a family in the first place. My mum found it really tough and used to cry a lot, and that made me really scared about her. I didn't even want them to live together but the sense of everything falling apart was terrifying. I was absolutely terrified of turning 18 and remember staying up all night the night before crying, because it was the last point any of us were legally children and I conflated that in my head with the point that everything would finally fall apart. I left home permanently as soon as I could just to get away from the misery of it all.
As adults, my brothers and I are all extremely private and independent people. We've done well academically and have friends, good jobs etc. but none of us have had meaningful relationships and I know we all struggle a bit to open up to people emotionally. I think a part of that must be never having had a real relationship modelled to us. There are other things I notice as well, like it took us a long time to learn how to cook food that wasn't very idiosyncratic and we tend to eat quickly and without talking, which I think is because we haven't had family meals since we were small children. From secondary age we ate separately, and alone, just because there wasn't that social space keeping us together as a family.
I do think it's tough being the child of divorce as well, and navigating two households, and I don't want to minimise that at all. But even relationships that don't have that much actual conflict in can be difficult to grow up in as well. I've visited my parents separately as an adult and we'll eat together in the evenings, we'll chat together in the living room and the kitchen and my mum has a thriving social life with friends round for dinner parties all the (non-covid!) time. She's started seeing someone and he's lovely and warm, and the flat feels like somewhere where people love each other and get on. While there are so many things that I think would have been hard if they had split, I think that it would have been a much nicer place to grow up.
tl;dr - I think staying together for the children can work when they're small, if there's no real conflict, but in my experience it becomes stressful when they're teens and have an awareness of what relationships are meant to be like.