What is marriage supposed to do, even?
Legal rights.
Things like access to your spouse if they are hospitalised, making decisions for your spouse if they are incapacitated, tax breaks, and inheritance rights in the event of your spouse's death (instead of your partner's family taking away everything from you).
For example: Imagine if you're not married and your partner falls terminally ill and you are barred from visiting or even have access to the status of your partner or make medical decisions for them because you're not 'family', and then they kick the bucket and you were kept in the dark because you were not 'family', and you can't even make funeral arrangements or see them off, and you're homeless because the house you and your partner shared was under their name and their family comes to legally take it all away, even though you unofficially paid for it together with your partner.