What about when a spouse passes?
The marital contract ends upon the death of one of the spouses—the other party (sorry to put it horrendously crudely) being no longer able to fulfill it.
So the widow or widower is then free to remarry.