He is running to be Hillary’s VP as a national unity ticket against Trump
The GOPe setup to stop Trump is pretty simple: Use Cruz to try to steal votes from the right of Trump and use Kasich to try to steal votes from the left of Trump. In NY Kashich and Cruz made sure they never worked the same district in order to maximize their chances of stopping Trump from hitting 50%.