So all heterosexual marriages serve the purpose of perpetuating human life?
Moreover, why should marriage necessarily serve the purpose of perpetuating human life?
'Nature' doesn't always give a child a mother and father, though. Where, for example, does IVF figure in this?
No but the provision is there for the continuation of our species.
Marriage is a bond, a unity and unity is very important for family stability and happiness. Anything that can reinforce commitment and binding is helpful so a formal commitment can make a huge difference as opposed to someone just shacking up and feeling no responsibility to stay once things get tough.