What does Matthew 5:31 mean?

Matthew 5:31 KJV
It hath been said, Whosoever shall put away his wife, let him give her a writing of divorcement:

Matthew 5:31 NKJV
“Furthermore it has been said, ‘Whoever divorces his wife, let him give her a certificate of divorce.’

Matthew 5:31 MKJV
It was also said, Whoever shall put away his wife, let him give her a bill of divorce.

Matthew 5:31 KJV 2000
It has been said, Whosoever shall put away his wife, let him give her a writing of divorcement:

Interlinear KJV

/de/ It hath been said /rheo/, /hoti/ Whosoever /hos/ /an/ shall put away /apoluo/ his /autos/ wife, /gune/ let him give /didomi/ her /autos/ a writing of divorcement: /apostasion/

Jamieson Fausset-Brown

31. It hath been said–This shortened form was perhaps intentional, to mark a transition from the commandments of the Decalogue to a civil enactment on the subject of divorce, quoted from De 24:1. The law of divorce–according to its strictness or laxity–has so intimate a bearing upon purity in the married life, that nothing could be more natural than to pass from the seventh commandment to the loose views on that subject then current.

Whosoever shall put away his wife, let him give her a writing of divorcement–a legal check upon reckless and tyrannical separation. The one legitimate ground of divorce allowed by the enactment just quoted was “some uncleanness”–in other words, conjugal infidelity. But while one school of interpreters (that of Shammai) explained this quite correctly, as prohibiting divorce in every case save that of adultery, another school (that of HILLEL) stretched the expression so far as to include everything in the wife offensive or disagreeable to the husband–a view of the law too well fitted to minister to caprice and depraved inclination not to find extensive favor. And, indeed, to this day the Jews allow divorces on the most frivolous pretexts. It was to meet this that our Lord uttered what follows:

British Family Bible

It hath been said, &c. See De 24:1. Here his words are, not as before, “it hath been said to them of old,” but only “it hath been said;” to note that this was not a precept given by Moses to divorce their wives but only a permission in some cases. See Mt 19:8. Dr. Whitby. Among the Jews and heathens, but more particularly among the latter, the power of divorce was carried to a great extent, and exercised with the most capricious and wanton cruelty. It was full time for a stop to be put to these increasing barbarities; and it was a task worthy of the Son of God Himself, to stand up as the Defender and Protector of the most weak and helpless part of our species. Accordingly he here declares, in the most positive terms, that the only legitimate cause of divorce is adultery; and this has, by the experience of ages, been found to be a most wise and salutary provision, no less conducive to the happiness than to the virtue of the species. Bp. Porteus.