How Trump’s bet on voters electing him managed to silence some of his legal woes