Marriage would make a lot more sense if it came from a specific religious institution, however I can't really pinpoint it.
I've read somewhere that it might have been due to an Egyptian Queen who spearheaded the idea of marriage, but not sure if that's accurate.
I'd suggest also trying this question at r/askanthropology