In your opinion, when is it acceptable to have a marriage of convenience in romance books?

I read my fair share of marriage of convenience, it's one of my favorite tropes, but sometimes the reasons for the main characters to get married are 'stupid', for example, for revenge towards an ex or they are still single at 30 🙄.

I love when they get married for a 'good' reason like for a higher chance to get a child custody. I once read a book where the FMC's father was dying from cancer and he was heartbreaking that he'll never see her get married, so she asked someone marry her so that her father can die a happy man.

In your opinion, when is it acceptable to have a marriage of convenience in romance books?