I see a lot of people spend years in an unhappy marriage before filing a divorce.

They say, "Been unhappy with my wife/husband for X years. Finally divorcing!" or "Wasted X years with him/her!"

Why do these people marry someone they don't love or are happy with in the first place?