The GOP Primary is not over, not until Super Tuesday at least. Haley can stay in the race as long as she has money to continue campaigning and being visible, and I don't think she has any problems raising money.
If something were to happen to make Trump ineligible (either via the 14th amendment, a conviction, or a medical issue), the party would have to pick another candidate at the convention, and right now Haley is the only other candidate who can send delegates. The more delegates she earns, the less work she has to do to broker the outcome she wants. So she may stay in all the way to the convention, as long as she has the money to.
(The only caveat is that I thought most Republican primaries were winner-take-all for delegates, I guess NH is not though, because Haley is reported as earning 9 out of 22 delegates.)
Honestly I don't even know that I prefer Haley to Trump. I'm afraid she'll be just as bad as Trump policy-wise but more effective politically.
If nothing else, Trump mobilizes his opposition's base. Biden might still win against Trump but, but can he beat a kinda boring (compared to Trump) candidate?