This happens with some frequency and is not as outrageous as it sounds. If the grounds for your divorce is adultery, having sex with your spouse after you learn of it can legally be considered as forgiving the infidelity.
It also destroys the ability to use "constructive abandonment" as grounds for divorce. Constructive abandonment means a spouse has refused sexual contact even though capable of having sex, with the partner having requested it continuously for over a year. It is often considered the gentlest of the fault grounds.