It has nothing to do with matrimony.
Matrimony only makes sense from a heterosexual perspective. It establishes the union of a man and woman as support for having children. It derives from motherhood, which can only naturally occur through a heterosexual union.Middle English, from Anglo-French matrimoignie, from Latin matrimonium, from matr-, mater mother, matron — more at mother
Homsexual unions are a sort of relationship but it is perverse to think of that sort of relationship as "marriage".