If divorce was universally immoral, it would obviously be better to never marry, for one cannot see into other minds in order to know if they are truly rational, righteous, and sincere, and one cannot see into the future in order to know if a spouse would change into a tyrannical, egoistic, hypocritical partner. This is the reaction of the disciples to Jesus (Matthew 19:10) when he says that it is not morally legitimate to divorce for any reason at all, which is what the Pharisees ask him about (19:3). Jesus is not denying Yahweh's approval of divorce for more than just adultery, a common misunderstanding. He affirmed the righteousness and enduring nature of Mosaic Law (Matthew 5:17-19, 15:1-14), which permits divorce for broader circumstances than adultery, whereas the Pharisees of Matthew 19 misrepresented it as commanding divorce (19:7). Moreover, Jesus mentions divorce for "sexual immorality" (19:9), which is far broader than just adultery, encompassing acts like rape as well (Deuteronomy 22:25-27).
What the Pharisees were alluding to, albeit in a straw man manner, is the divorce portion of Deuteronomy in verses 1-4 of chapter 24. In this chapter, God says that men can divorce their wives if the former find something "indecent" about her. Unlike the position presented to Jesus in Matthew 19 entails, which he rejected, Mosaic Law does not permit divorce for any and every reason. There is no sin in developing a disability or having a certain personality trait (given that it is not expressed irrationally/sinfully) or accidentally overcooking food, for example. The husband of Deuteronomy 24:1-4 is not morally free to dissolve the marital bond on a mere whim because of petty, emotionalistic, or otherwise asinine reasons. This is the context from which Jesus responded to the Pharisees--remember, he said he absolutely did not come to abolish the obligations of Mosaic Law earlier in the book of Matthew.
However, is divorce only Biblically permissible when initiated by husbands? Not at all! Not only is there no text in the Torah saying wives cannot divorce their husbands as long as they too have valid grounds, making this morally permissible since it also does not logically follow from some other direct command that this is automatically sinful (Deuteronomy 4:2), and not only is there logical equivalence in an offended male or female spouse ending their marriage (which Genesis 1:26-27 would be consistent with), but there is already a key passage that addresses a woman voluntarily leaving a marriage because of how she is treated. Exodus 21:9-11 mentions that a wife is free to leave a marriage if she suffers material neglect or abuse, so she is not sinning in any way. Even aside from how Deuteronomy 24:1-4 would already apply to both genders in the Christian worldview, Mosaic Law separately touches upon a more particular basis for divorce and how women are of course allowed to terminate their marriages in the right contexts, contexts distinctly outside of mere adultery on their husband's part.
Since acts like physical assault (Exodus 21:18-19), nonconsensual sex (Deuteronomy 22:25-27), and so on are sinful, they would have to fall under general moral indecency, which Deuteronomy 24 already cites as a valid reason to divorce. Capital sins like rape, sins which are prescribed the death penalty, would legitimize divorce by the victimized party, male or female, for the offender deserves to be killed anyway, which would already result in the end of the marriage. Just to clarify, though the case law for rape mentions a male rapist and female victim, it would still be applicable to male victims and female aggressors for the same aforementioned reasons the divorce laws of Deuteronomy 24 would, but there is the additional fact that Deuteronomy 22:26-27 says that rape is like murder: a sin that is immoral for everyone, as if that would need to be stated in gender neutral language for this to be obvious (Exodus 20:13), that always deserves death no matter the gender of the person on either end of the deed (Exodus 21:12-14, Numbers 35:30-31).
Also, Paul speaks of divorce in gender neutral ways, mentioning how both husbands and wives are not to casually divorce and how spousal abandonment frees a spouse of either gender from the marriage status (1 Corinthians 7:10-16). Remarriage to one's divorced former spouse after they marry another person, who in turn either dies or divorces them, is prohibited, not divorce itself (Deuteronomy 24:2-4). It is also available to all abused women and men alike. Divorce is neither something to rush to over amoral or relatively trivial matters nor something to vehemently oppose universally. As painful as it might be, it is better to divorce than to suffer unwavering abuse, and just as there is no sin in defending oneself when called for (Exodus 22:2), there is also no sin in liberating oneself from a marriage that is threatening or suffocating because of actual sins like physical abuse, neglect (which can be a form of abuse in itself), adultery, rape, legalistic demands, and so on. It is pathetic that some people deny the Bible teaches this even as they might deny the gender equality of Mosaic Law.