The phrase "putting away" is a biblical term used to describe divorce or the act of ending a marriage. In the Old Testament, divorce was permitted under certain circumstances, but it was not something that God desired or approved of. Jesus is emphasizing that divorce and remarriage are not to be taken lightly and should only be considered in the most extreme situations.
The phrase "dealing treacherously" in Malachi 2:14 refers to a person who is unfaithful to their spouse and breaks their marriage covenant. This is similar to the concept of adultery that Jesus mentions in Luke 16:18. Both verses are warning against the serious sin of infidelity and the breaking of the marriage covenant.
In Malachi 2:14, God reminds the Israelites that he has been a witness to their marriage covenant and that they have committed a sin against him by dealing treacherously with their spouses. Despite this, the wife is still considered a companion and the wife of their covenant.
In biblical teaching, there are limited reasons for ending a marriage. Adultery is one of the reasons that is considered legitimate for ending a marriage. However, even in such a case, it is not required that the marriage ends, and forgiveness and reconciliation are encouraged whenever possible. Apart from adultery, other reasons that could potentially end a marriage include abandonment, physical abuse, and unrepentant ongoing sin.
In summary, both Malachi 2:14 and Luke 16:18 emphasize the seriousness of divorce, infidelity, and the breaking of the marriage covenant. While divorce may be permitted under certain circumstances, it is not something to be taken lightly or pursued without careful consideration and prayerful guidance.