Many people get married because it is simply the expected norm. It guarantees that women can fulfill her urge to be a mother, and perhaps in a lesser way, the man can fulfill his urge to be a father. Baboons and other primates are notoriously promiscuous and do not seem to be driven by parenthood. The man gains access,or thinks he will gain access, to an ample supply of poon.
I disagree that BSB knows the reasons for marriage for anyone other than himself. There is a sex drive and there is societal pressure, as well as the desire of parenthood,and surely many other reasons, and we all have a mixture of motives that is unique to us.
The Bible mentions homosexuality in several places, but none of the ten commandments addresses it directly. Three of the ten address God and religious loyalties. I suspect that these were written by Moses or perhaps several priests,and not actually dictated by God in his guise as flaming shrubbery.
I would not regard being married for 22 years as a failure. Before modern medicine, people died before being married for that long. Over the years, people change, and two people who were compatible at 20 will not always be compatible at 40 or 50 or 60,no matter what they do.