Our Gemara on Amud Beis discusses the permissibility of marrying a woman on Chol HaMoed.
Shmuel said: It is permitted to betroth a woman on the intermediate days of a Festival, lest another come and betroth her first. (Betrothal is Eirusin, where the bond of marriage is accomplished but they do not yet have nisuin, living together.)
The Gemara raises a question about the ruling itself: And did Shmuel actually say that we are concerned that perhaps another man will come and betrothe the woman first? But didn’t Rav Yehuda say that Shmuel said: Every day a Divine Voice issues forth and says: The daughter of so-and-so is destined to be the wife of so-and-so; the field of so-and-so will belong to so-and-so? If this is the case, why should one be concerned lest another betroth her first? It is predestined that he will marry his designated mate.
Rather, Shmuel’s statement should be understood as follows: Perhaps another man will come and betroth her first by means of praying for divine mercy. In other words, Shmuel is concerned that the rival may beseech God to cancel the decree of the Divine Voice, and therefore the first man needs to hurry and betroth the woman before the other one has a chance to pray that he should take her from him.
Taken literally, the Gemara espouses a belief in a soul mate. Also taken literally, with sufficient prayer, one can circumvent and override a divine decree as well. Despite the superficial readings, various Rishonim have a different take on the matter. It would seem from Rashi (“O Iyhu”) that the prayer would only work to bring about the woman’s death, that no one should get her, but not to actually circumvent the decree. Similarly, but different, Sefer chassidim 383 also holds that the original decree of the the soul mate will be fulfilled, though the one who prays may temporarily merit this woman as his wife. In other words the marriage won’t last, and either through death divorce, she will marry her true soul mate. This is also stated in Yerushalmi Ta’anis 4:6. However, Tosafos (Sanhedrin 22a, “Arbaim”) seems to hold that not only can prayer change the marriage but even the gender!)
The Rambam takes a more practical approach to this matter. Here is what he states in the 8th chapter of Shemoneh Perakim:
Men are, however, very often prone to err in supposing that many of their actions, in reality the result of their own free will, are forced upon them, as, for instance, marrying a certain woman, or acquiring a certain amount of money. Such a supposition is untrue. If a man espouses and marry a woman legally, then she becomes his lawful wife, and by his marrying her he has fulfilled the divine command to increase and multiply. God, however, does not decree the fulfillment of a commandment. If, on the other hand, a man has consummated with a woman an unlawful marriage, he has committed a transgression. But God does not decree that a man shall sin. Again, suppose a man robs another of money, steals from him, or cheats him, and then uttering a false oath, denies it; if we should say that God had destined that this sum should pass into the hands of the one and out of the possession of the other, God would be preordaining an act of iniquity. Such, however, is not the case, but rather that all of man's actions, which are subject to his free will, undoubtedly either comply with, or transgress, God's commands.
Rambam categorically denies the idea of a preordained spouse, or a soul mate - at least by heavenly decree. How does the Rambam understand our Gemara? The Chiddeshi HaRan here explains the Rambam׳s position as follows: The choice to marry is completely in the hands of the human being, as Hashem will never interfere in the choices humans make to perform mitzvos or the opposite. However, once the person decides to marry and commits to the Mitzvah, heaven will guide him to his soul mate.
A different answer, which I think fits the Rambam’s overall philosophy and language better is that the propensities, based on character, disposition and family background are “decreed”. That is metaphorically, we can recognize that there are people who are meant for each other based on their qualities. However, it is solely up to them to put in the effort to find that person. Their actions will lead to merit and guidance from God to find their soul mate or not, based on whom they deserve to marry. Thus the Gemara means “decreed” in a metaphoric sense, and also means that prayer could cause the other person to beat him in a choice of wife, really means prayer and other forms of channeling divine guidance and merits. This is typical of the Rambam who tends to demythologize aggados, by understanding them as speaking in different levels. Other one hand, they offer simplistic guidance and folk wisdom of basic ethics to the less sophisticated. However the more sophisticated will understand the essential idea and truth behind the simplistic statement. Thus the essential idea is that the one whom you marry is your soulmate, and you must accept God’s guidance. One needs to work to deserve God’s guidance, based on behaviors, prayer and character disposition. However, it is enough for the simple folk to accept that God “decrees” whom they’re supposed to marry so they understand the importance of respecting marriage.
This idea about aggadah, that is meant to be taken by the simple folk one way, and by the advanced scholar in another way, is explained explicitly in Rambam’s introduction to the Moreh:
We have further noticed that when an ill-informed Theologian reads these Midrashim, he will find no difficulty; for possessing no knowledge of the properties of things, he will not reject statements which involve impossibilities. When, however, a person who is both religious and well educated reads them, he cannot escape the following dilemma: either he takes them literally, and questions the abilities of the author and the soundness of his mind-doing thereby nothing which is opposed to the principles of our faith,--or he will acquiesce in assuming that the passages in question have some secret meaning, and he will continue to hold the author in high estimation whether he understood the allegory or not…It has been treated in metaphors in order that the uneducated may comprehend it according to the measure of their faculties and the feebleness of their apprehension, while educated persons may take it in a different sense.
Actually, Rambam addresses our Gemara explicitly in a responsum (Teshuva 158) where he explains it as above, and not like the Ran. Here is an excerpt:
Whomever seeks out an aggadah that runs contrary to the basic and logically imperative idea that is foundational for reward and punishment is committing intellectual suicide (yes, this is a direct translation of the Rambam’s fiigure of speech.) For example, the idea from our sages that a person’s wife is decreed from Heaven, if you were to take this literally, how do you understand the verse (Devarim 20:7) regarding the newly engaged:
Is there anyone who has paid the bride-price for a wife, but who has not yet married her? Let him go back to his home, lest he die in battle and another marry her.
Rather, when you find an isolated teaching or verse that seems to contradict this basic principle of free choice, you must investigate it with an internal sense of judgment to try to understand and interpret it properly. And should you be unable to come up with a proper interpretation, he should say to himself, “this verse or the words of this sage has an important deep message that I have not yet been able to decipher, and they are not literal.”
Regarding the declaration that so and so is predestined to marry so and so, it is referring to the idea of merit or lack thereof. God will guide the person to the mate he deserves. A worthy person will end up with someone of comparable Middos, and of course the reverse as well, all as fit in the eyes of God may He be exalted.
The Rambam is not denying providence. Rather he is saying the providence is not fate, but constantly changing based on what the person deserves now.
It is interesting to note, the Rambam inspired other great thinkers to offer interpretations of his ideas. Often those interpretations, turn out to be far more apologetic and conservative than the Rambam’s actual intentions. Thoug these peshatim are the product of great sages and worthy in their own right, such as this peshat from the Ran, when we discover the Rambam’s own explanations in Teshuvos that the commentators did not have access to, we see a different picture. The Rambam was a strong rationalist who had deep respect for the wisdom of Chazal, but did not mythologize it, and instead looked at their ideas in the light of psychology and human nature instead of mysticism.
I will conclude with a final point. If this is true before you marry, namely, that God brings you the spouse you deserve, it’s also true after you marry. You and your spouse are constantly recreating yourselves and therefore constantly getting what you deserve, for worse and hopefully better.