> the benefits aren’t particularly great while the risks are large.
Marriage brings specific legal and financial benefits, depending on the country (married couples tax allowances, spousal rights to pensions and inheritance etc, spousal privilege in court, visa/residency rights, child custody rights).
As these benefits have reduced over a few decades, the number of marriages has gone down (at least in the West?). I don't think that's a coincidence.
You don't need a legal marriage to share a loving and fulfilling life together with a partner. But, if you do share a loving and fulfilling life together, marriage might benefit you for one or more of the above reasons.