Things aren't geared towards leaving because for millennia the full power of the church, the establishment, the law and society has persuaded people that the "sanctity of marriage" trumps everything else and this is built into the fabric of life. Its not surprising that people find it hard to go against the grain.
There are also, obviously, good reasons why people should not walk out of marriages lightly.
But in reality, if your marriage no longer gives you what you need, there's no point staying in it, IMHO.
That's not to say that people can't repair marriages after infidelity. They can and do if they are both determined to change the rules of engagement and recommit.
But what you often hear about and read under the heading "working on the marriage" is a shorthand for "the woman tolerating it when the man strays and keeping shtum."
As someone else pointed out, infidelity is not necessarily the worst thing that can happen for a marriage and its not always a dealbreaker. In a way the infidelity is a red herring. If the marriage is broken and not working, its impossible to fix and ultimately "fixing" it will make both miserable.
Bottom line is, if there is something in your marriage worth saving and your DH is prepared to go all out to save it then working on your marriage might be well worthwhile. But if "working on it" means struggling on when that ship has sailed, then its not.