Did the Buddha ever mentioned what is the cause for having lovers / marriage? I know there are clear explanations of cause and effect for things like the 5 precepts whereby;
Killing is the cause for short live, stealing is the cause for being poor etc...
But did our Lord Buddha or in any Sutta mentioned what is the cause for having romantic partners / marriage? Why do some people have lots of relationship, gets married and able to establish a family at a young age while some people might doesn't even have a lover?
This is aside from worldly conditions such as being good looking or rich. We all have seen some people whom might not be good looking or rich but was always attached while the good looking and rich lived a lonely life.
I'm not asking is it due to sexual misconduct whereby a relationship is broken due to adultery etc but rather the cause (Karma) for having a partner.
Thank you.
Geshe Michael Roach taught that the cause for finding a companion was to give companionship.  He recommended nursing homes as one place to go and offer companionship to others to create the cause for relationship.  He also said that there is a text that did list &quot;deeds&quot; and the &quot;consequences&quot;.  I am not sure if it is words of the Buddha.  Unfortunately, I don't know the name and I don't think it has been translated into English.  When someone wanted to change something that was sticking them, he would go into the book and find out exactly what they needed to do.
I have used the basic ideas of cause and effect to find a spiritual partner.  I was looking for someone to share my spiritual journey with me and support my practice.  Knowing the general idea is to do to others what you would like to have or have done to you, I figured out a way to do this.  I located a person in long term retreat and set up a monthly donation to their practice.  I don't think they even knew.  I then dedicated my practice to their enlightenment.  My current partner and I met soon after I started this, although it was a few more years before we became a couple.  I am essentially a hermit, so finding a partner really is a miracle.  We've been together 5 years.
To leverage cause and effect, simply find ways to help people have relationships or encourage people to stay in relationships or improve their relationships.  Be creative.  Offer what you would like to receive.  Get detailed about what you would like to receive, do those actions, and dedicate what you do to your goal.
I was taught about a sutra called The Teaching of the Four Practices that teaches how to purify karma.  Perhaps you already know a purification practice that you can undertake to clear your obstacles. You can create new causes, but always good to get rid of old causes for not being in relationship.
The four practices (or powers) in brief are:

Foundation power  - this is simply Buddhist refuge
Destruction power - recognizing what you did will come back to hurt you (if you don't have a memory of it, just realize that in some life you harmed relationships - your own or others)
Power of restraint - resolve never to harm relationships again
Power of antidote - studying and understanding emptiness and karma  as well as undertaking action to undo what you did (in this case, helping people stay in relationship and/or being a nice companion)