A way of ending an unsatisfactory
marriage - sometimes by mutual agreement - has first evidence in the late 17th century.
As divorce was a practical impossibility for all but the very wealthiest, lucrative (for the husband) wife selling persisted in England in some form until the early 20th century.
 Some readers (mostly female) might find the idea that a man has a right to 'claim' his wife, a bit bizarre.
But throughout history, and certainly at the time of Mary Gulliver’s, owning people was the rule of the day. A husband's ownership of his wife, children and servants was commonly accepted as part of life, as was the King's ownership of them all. Justified and glorified by God's ownership of kings and their dominions.
It probably evolved way back in pre-history, when the stronger specimen accumulated so many subordinates, that sheer power was no longer sufficient to keep them enslaved. At that point (probably) higher powers were called into action, sowing the fear of Gods into the hearts of the enslaved, assuring them that the King is appointed by those very Gods, who would make sure that the enslaved would be rewarded for their further obedience, surely, in the world to come.
Since no slave has ever come back to contest the validity of that promise, rulers felt safe to bestow these promises right and left.
In the time of Mary Gulliver's, women were pretty much at the bottom of this power-chain (God-King-Man.) As such, they were the property of their fathers and later, the property of their husbands.
In the 17th century the only way out of a marriage was when one of the spouses died. Unless, (of course, as usual,) you were a man, and had enough money to pay Parliament to nullify your marriage.