Actually, I have heard that by her staying in the race, Trump gets formal electors for the nomination.
If she quits, the local Republican parties pick the electors, as I understand.
I highly doubt this is why she is staying in the race against Trump.