According to Mrs. Sanford's statement, they had been separated two weeks, and the goal of the separation was to work toward repairing the marriage.
Yes, that's usually a stated goal, otherwise there would be no need for formal separation, people might as well proceed immediately to file for divorce. By the time of declaring a formal separation, marriage has been on the rocks or dead for a while, and reconciliation has not yet occurred. None of which is to say that they may not be successful in repairing the marriage, if that goal is real and not just a stopgap on the way to divorce.
Marriage is a social contract which, like many other contracts, sometimes fail through the fault of either party, both parties, more than two parties or through no one's fault. It just happens. People fail, marriages fail for many reasons. I don't know if people in politics or positions of high visibility are more susceptible to troubles in marriage or it's just more visible and talked about in the media and in public, but that's a matter of statistics and social studies, it's none of my concern.
It should generally be a private matter, including people in public life. Some couples with troubled marriages divorce, some stay in the loveless or pretend-marriage arrangement for various reasons including financial or commercial, political viability (e.g. Bill and Hillary Clinton, John and Elizabeth Edwards) or "for the sake of the children" etc. Some simply wait until they find someone they expect to marry before dissolution of marriage, with the understanding that marriage is already over.
These are or should be all private matters, even for people in public service. The problem with Mark Sanford is that he practically went out of his way to make it public, and at the worst possible time for family (Father's Day) and in the worst possible manner, by having his aides lie to the public about his whereabouts. I don't know if he used his work (state) computer for emails, but that would be incomprehensible as well.
I am not talking here about any illegalities, or about his private life or "hypocrisy" or "appearance of impropriety," however minor or perceived. I am talking about profound lack of judgment for a person long in public life, in putting, on his own, a private matter on a public display and in the worst possible light.