As divorce was only accessible by the wealthiest, wife selling was a way for ending an unsatisfactory marriage by mutual agreement.
The custom appeared in England at the end of the 17th century and persisted until the early 20th century.
More info: Wife Selling