Marriage because they’re dying

So

Would you marry someone you recently started dating if they were dying?

I just started watching a series on Netflix where a couple got married because she was dying in 6 months and she wanted to be married before she died.

Would you ever do this? Is this wrong?