You can have kids with a partner, but really no reason to formalize it with “marriage”. I guess there are tax reasons though that make it more logical though.
But there are also subtle but real and pervasive social & community benefits to it. You are often perceived by default as "established," reliable, trustworthy when you are married, in ways you wouldn't be in an unmarried partnership.
"Just a construct of society?" Sure. So is money. Something being a social construct doesn't mean it's fake, or powerless.