‘Humans came up with socially enforced marriage because it is a better deal for all concerned’
Humans did not come up with marriage. God ordained marriage.
Same-o, same-o.
However, it did pre-date monotheism.