The way you framed it was that men got married to “get sex”. There was no mention of lofty goals that you are now mentioning.
Yes, men want sex. So do women. In the past the only way to have sex without being driven from polite society was to be married, which was a strong incentive for men (and women) to marry.