I would have been more surprised if Charlotte and Gad had gotten married and stayed together for decades. If that sort of thing was important to him then presumably he'd still be with the mother of his first son. Also, he's a lot older than Charlotte and they come from very dissimilar backgrounds and don't seem to share many interests.
Additionally, Charlotte's own family has modelled a very different lifestyle compared to the traditional nuclear family. Caroline has had an eventful romantic life but seems to have been a good mother throughout all of it. Albert fathered, (at least), two children before he married and Stephanie literally ran away to join the circus with one of her partners, but again, they both seem to have good relationships with their children. So Charlotte has seen first hand that unconventional choices don't need to be a disaster for the children involved.
Finally, and maybe most importantly, Charlotte doesn't need Gad for anything. She's good looking, seems reasonably smart, very wealthy and has all the social and family connections anyone could ever ask for. I know there are plenty of long term marriages that are truly happy ones, but there are also many that are made to work in spite of unhappiness because one of the spouses - often the woman - is financially dependent on the other. Charlotte obviously doesn't have to make that kind of bargain and, IMO, if it's clear the relationship isn't working it's better to get out now and establish a civil co-parenting partnership than stick it out and have everyone be miserable for years.