This is from memory, so I could be wrong. I recall that Obama didn’t want to get married because he saw it as a middle-class white convention. Michelle wanted it legal, and insisted on formalizing the arrangement. Barry caved.
I don’t recall if that’s from Dreams or from another source. I’m pretty sure it’s accurate, though. Fwiw.
IIRC that was related in the book”Barack and Michelle”, by Christopher Andersen. Their courtship was anything but romantic: one-upmanship extraordinaire.