There is no requirement that legal marriage between a man and a woman involve child-raising. There is no requirement that legal marriage between a man and a woman involve love or sex.
If Albert, Barbara, and Charles go to San Francisco City Hall in 2008, and Albert says "I want to marry Charles", he's told no. If he says "I want to marry Barbara", he's told yes. The state knows nothing about their sex life or feelings about children. What is the rationale?