It depends on the country. In France, you definitely gets lots of tax advantage getting married, and in many cases 1 person earning X is not so different than 2 people getting x/2 after tax.
That is definitely not true in the UK, at least when I was working there from 2011 to 2017.