Yes, in the beginning God made man and woman, and they married so that there was no divorce. That was the original intent.
That has always been God’s original intent and Jesus confirmed it.
However, during the time of Moses, God allowed for a captive woman who was an unbeliever to be provided for. It was God who gave the Israelites their land, because the sins of their enemies reached to the skies.
It was said to the Israelites:
“Do not say in your heart when the Lord your God has driven them out before you, ‘Because of my righteousness the Lord has brought me in to possess this land,’ but it is because of the wickedness of these nations that the Lord is dispossessing them before you. It is not for your righteousness or for the uprightness of your heart that you are going to possess their land, but it is because of the wickedness of these nations that the Lord your God is driving them out before you, in order to confirm the oath which the Lord swore to your fathers, to Abraham, Isaac and Jacob." (Deuteronomy 9:4-5)
So God drove out the foreign nations who practiced idolatry. In those times, the foreign men of war would have been killed. Some of the women and children would have been spared.
If an Israelite man fell in love with a foreign woman, in this case, he could take her as his wife. Over time, she could have been converted and saved. But if he discovered that she was not pleasing to him, he could send her away with a certificate of divorce.
“It shall be, if you are not pleased with her, then you shall let her go wherever she wishes; but you shall certainly not sell her for money, you shall not mistreat her, because you have humbled her.” (Deuteronomy 21:14)
So God provided for a way that the women could be provided for. Otherwise, captive women became servants.
God allowed this kind of marriage to give the women a chance to repent and start a new life, and worship the true God. However, if things didn’t work out, a certificate of divorce was allowed in this instance, but the women were not to be mistreated.
Ruth (Ruth 1:4) is an example of a foreign woman who married a Jewish man. Things worked out so well that Ruth became the predecessor to Jesus (Matthew 1:5), who came from her line.
However, if things didn't work out, the foreign unbelieving woman could be sent away. "Do not be bound together with unbelievers; for what partnership have righteousness and lawlessness, or what fellowship has light with darkness?" (2 Corinthians 6:14). This is similar to what happens in New Testament times: believers are not bound to unbelievers if unbelievers are unwilling.
Even though God hates divorce, there are a few special circumstances in which people can separate.
1) Believer vs unbeliever – If a person becomes a believer in Jesus but the spouse is an unbeliever, if the spouse is unwilling to live with the believer, a separation is allowed:
“…If any brother has a wife who is an unbeliever, and she consents to live with him, he must not divorce her. And a woman who has an unbelieving husband, and he consents to live with her, she must not send her husband away. …Yet if the unbelieving one leaves, let him leave; the brother or the sister is not under bondage in such cases, but God has called us to peace” (1 Corinthians 7:12-13, 15).
2) Adultery already happened – Jesus said that divorce is disallowed unless there is reason of unchastity. This means some form of adultery already happened within the marriage. “It was said, ‘Whoever sends his wife away, let him give her a certificate of divorce’; but I say to you that everyone who divorces his wife, except for the reason of unchastity, makes her commit adultery; and whoever marries a divorced woman commits adultery.” (Matthew 5:31-32)
So if a woman was unchaste and her husband is unwilling to live with her, he may send his wife away, because the marriage has already been broken by her. However, it seems neither of them should remarry.
3) No safety – If a woman is unsafe living with her husband because of abuse, she may leave. “But to the married I give instructions, not I, but the Lord, that the wife should not leave her husband (but if she does leave, she must remain unmarried, or else be reconciled to her husband), and that the husband should not divorce his wife” (1 Corinthians 7:10-11).
The caveat “if she does leave” provides for cases where her life might be in danger because the husband is abusive to her.
But the general law of God stands as is shown here: “the wife should not leave her husband…, and the husband should not divorce his wife” (1 Corinthians 7:10-11). If we can reconcile and make peace, let us do so, because that is the will of God.
As for the case of Moses allowing a certificate of divorce, Jesus said it was due to people’s hardness of heart and unwillingness to make peace. In ancient times, people divorced for reasons other than these three. So people’s hearts were hard.
But God allowed these things back then, because people did not know Jesus and did not have the Holy Spirit in them to help them to learn to love. Without Jesus and the Holy Spirit dwelling within, people loved imperfectly and were hard-hearted.
However, it is no longer this way with us. Jesus reinstituted the no-divorce law. And unless it is very special circumstances mentioned above, God calls us to love and peace and to stay together.