Who was the last cabinet officer to be elected to the White House? Prior to Bush senior the last sitting vice-president to be elected to the White House? I agree that Cruz still wants to be president. Serving a Trump administration for 8 years is not a path to that.
If Trump loses, it will likely mean that former Secretary of State Hillary Clinton will have become President. In addition to cabinet officers, sitting and former Vice-Presidents are frequently elected President. The most recent examples include Richard Nixon and Hubert Humphrey, with Lyndon Johnson succeeding after Kennedy’s assassination and then being elected President in his own right.