Easy. If a court rules that Cruz is not eligible Trump can replace him anytime. No downside risk for Trump here.
Just that Trump has been saying over and over he doesn't believe that Cruz is eligible to be president. He's threatened to sue over it. How does he walk that back now and say, "I was just kidding when I said that?"