I would argue that Cruz continues because he wants something and hopes to wield some power at the convention to that end
What does he want?
Cruz is going to be lucky if he’s allowed in the convention at this point. He should have cut a deal with Trump a month ago. That ship has sailed.
What does he want?
As the campaign wears on, and he continues to lose badly, his future plans shrink precipitously.
I’d imagine at this point, just staying in the Senate might be his last forlorn hope.